<xsd:element name="unit" id="el.unit">
<xsd:annotation>
<xsd:documentation>
<h:div class="summary" xmlns:h="http://www.w3.org/1999/xhtml">A scientific unit.</h:div>
<h:div class="description" xmlns:h="http://www.w3.org/1999/xhtml">
<h:p>A scientific unit. Units are of the following types:</h:p>
<h:ul>
<h:li>SI Units. These may be one of the seven fundamental types
(e.g. meter) or may be derived (e.g. joule). An SI unit is
identifiable because it has no parentSI attribute and will have
a unitType attribute. 2005-122-17 - this may be obsolete; PMR</h:li>
<h:li>nonSI Units. These will normally have a parent SI unit
(e.g. calorie has joule as an SI parent). </h:li>
<h:li>
Constructed units. These use a syntax of the form:
<h:pre>
<unit id="g.s-1" name="gram per second"
unitType="myUnitType:massPerTime">
<unit units="units:g" power="1"/>
<unit units="siUnits:s" power="-1"/>
</unit>
</h:pre>
This defines a new unit (g.s-1) which is composed from two
existing units (units:g and siUnits:s) to create a new unit. The
conversion to SI is computed from the two child units and may be
added as a 'multiplierToSI' attribute. Only siUnits or units with
'multiplierToSI' can be used as child units; 'constantToSI cannot
be used yet. If the new unit points to a unitType then the dimension
can be checked. Thus if the published dimension of massPerTime does not
agree with mass.length-1 an error is throwable.
Alternatively a new unitType can be added as a child.
</h:li>
</h:ul>
<h:p>
The relationship of a unit to its SI parent is potentially complex and
inconsistencies may arise. The following are available:
<h:ul><h:li>parentSI. This points to the ID of a parent SI unit. If this ID is the
same as the current unit the implication is that this is an SI unit.
</h:li>
<h:li>isSI. a boolean indicating whether the current unit is SI.
</h:li>
<h:li>multiplierToSI and constantToSI. If these are 1.0 and 0.0 (or missing)
the implication is that this unit is SI. However this is fragile as units can
be defined without these attributes and a unit could coincidentally have
no numeric differences but not be an SI unit.
</h:li>
</h:ul>
</h:p>
</h:div>
<h:div class="example" href="unit1.xml" xmlns:h="http://www.w3.org/1999/xhtml" />
<h:div class="curation" xmlns:h="http://www.w3.org/1999/xhtml">2003:04-09 Description or parentSI attribute enhanced.</h:div>
<h:div class="curation" xmlns:h="http://www.w3.org/1999/xhtml">2006:03-21 Added metadata and metadataList to content.</h:div>
</xsd:documentation>
<xsd:appinfo>
<!-- this will constrain link integrity to parents, etc. -->
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="metadata" />
<xsd:element ref="metadataList" />
<xsd:element ref="description" />
<xsd:element ref="annotation" />
<xsd:element ref="definition" minOccurs="0" maxOccurs="1" />
<xsd:element ref="unit" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>
<h:div class="summary" xmlns:h="http://www.w3.org/1999/xhtml">Child unit used to build new unit.</h:div>
<h:div class="description" xmlns:h="http://www.w3.org/1999/xhtml">
<h:p>These children must have 'units' and 'power' attributes.</h:p>
</h:div>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element ref="unitType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
<h:div class="summary" xmlns:h="http://www.w3.org/1999/xhtml">Child unitType describing type of new unit.</h:div>
<h:div class="description" xmlns:h="http://www.w3.org/1999/xhtml">
<h:p>This can be added by the author (in which case they are
responsible for checking consistency) or calculated by the software
from the child units.</h:p>
</h:div>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:choice>
<xsd:attributeGroup ref="id" />
<xsd:attributeGroup ref="units">
<xsd:annotation>
<xsd:documentation>
<h:div class="summary" xmlns:h="http://www.w3.org/1999/xhtml">Reference to a unit.</h:div>
<h:div class="description" xmlns:h="http://www.w3.org/1999/xhtml">
<h:p>This is used for the identification of child units when
new units are composed from existing ones. Athough the syntax looks
unusual it takes advantage of the tools for resolving units. See above for
syntax.
</h:p>
</h:div>
</xsd:documentation>
</xsd:annotation>
</xsd:attributeGroup>
<xsd:attributeGroup ref="title" />
<xsd:attributeGroup ref="abbreviation">
<xsd:annotation>
<xsd:documentation>
<h:div class="summary" xmlns:h="http://www.w3.org/1999/xhtml">Abbreviation for the unit.</h:div>
<h:div class="description" xmlns:h="http://www.w3.org/1999/xhtml">
<h:p>This may be obsolete and symbol should be preferred.</h:p>
</h:div>
</xsd:documentation>
</xsd:annotation>
</xsd:attributeGroup>
<xsd:attributeGroup ref="symbol">
<xsd:annotation>
<xsd:documentation>
<h:div class="summary" xmlns:h="http://www.w3.org/1999/xhtml">Symbol for the unit.</h:div>
<h:div class="description" xmlns:h="http://www.w3.org/1999/xhtml">
<h:p>This may be used for typographical display but NOT for identification
as there is considerable variation in use.</h:p>
</h:div>
<h:div class="curation" xmlns:h="http://www.w3.org/1999/xhtml">2006-01-29: PMR. Added attribute.</h:div>
</xsd:documentation>
</xsd:annotation>
</xsd:attributeGroup>
<xsd:attributeGroup ref="name" />
<xsd:attributeGroup ref="parentSI" />
<xsd:attributeGroup ref="isSI" />
<xsd:attributeGroup ref="unitType" />
<xsd:attributeGroup ref="multiplierToData" />
<xsd:attributeGroup ref="multiplierToSI" />
<xsd:attributeGroup ref="constantToSI" />
<xsd:attributeGroup ref="power">
<xsd:annotation>
<xsd:documentation>
<h:div class="summary" xmlns:h="http://www.w3.org/1999/xhtml">Power of unit used to create new one.</h:div>
<h:div class="description" xmlns:h="http://www.w3.org/1999/xhtml">
<h:p>Only allowed on child units</h:p>
</h:div>
</xsd:documentation>
</xsd:annotation>
</xsd:attributeGroup>
</xsd:complexType>
</xsd:element>
|