Definition Type: Element
Name: unit
Namespace: http://www.xml-cml.org/schema
Containing Schema: schema.xsd
Abstract
Documentation:
A scientific unit. A scientific unit. Units are of the following types: 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 nonSI Units. These will normally have a parent SI unit (e.g. calorie has joule as an SI parent). Constructed units. These use a syntax of the form: <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> 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. The relationship of a unit to its SI parent is potentially complex and inconsistencies may arise. The following are available: 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. isSI. a boolean indicating whether the current unit is SI. 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. 2003:04-09 Description or parentSI attribute enhanced. 2006:03-21 Added metadata and metadataList to content.
Collapse XSD Schema Diagram:
Drilldown into unitType in schema schema_xsd Drilldown into unit in schema schema_xsd Drilldown into definition in schema schema_xsd Drilldown into annotation in schema schema_xsd Drilldown into description in schema schema_xsd Drilldown into metadataList in schema schema_xsd Drilldown into metadata in schema schema_xsd Drilldown into power in schema schema_xsd Drilldown into power in schema schema_xsd Drilldown into constantToSI in schema schema_xsd Drilldown into constantToSI in schema schema_xsd Drilldown into multiplierToSI in schema schema_xsd Drilldown into multiplierToSI in schema schema_xsd Drilldown into multiplierToData in schema schema_xsd Drilldown into multiplierToData in schema schema_xsd Drilldown into unitType in schema schema_xsd Drilldown into unitType in schema schema_xsd Drilldown into isSI in schema schema_xsd Drilldown into isSI in schema schema_xsd Drilldown into parentSI in schema schema_xsd Drilldown into parentSI in schema schema_xsd Drilldown into name in schema schema_xsd Drilldown into name in schema schema_xsd Drilldown into symbol in schema schema_xsd Drilldown into symbol in schema schema_xsd Drilldown into abbreviation in schema schema_xsd Drilldown into abbreviation in schema schema_xsd Drilldown into title in schema schema_xsd Drilldown into title in schema schema_xsd Drilldown into units in schema schema_xsd Drilldown into units in schema schema_xsd Drilldown into id in schema schema_xsd Drilldown into id in schema schema_xsdXSD Diagram of unit in schema schema_xsd (Chemical Markup Language (CML))
Collapse XSD Schema Code:
<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>
		                  &lt;unit id="g.s-1" name="gram per second" 
		                    unitType="myUnitType:massPerTime"&gt;
		                    &lt;unit units="units:g" power="1"/&gt;
		                    &lt;unit units="siUnits:s" power="-1"/&gt;
		                  &lt;/unit&gt;
		                </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>
Collapse Child Elements:
Name Type Min Occurs Max Occurs
metadata nsA:metadata (1) (1)
metadataList nsA:metadataList (1) (1)
description nsA:description (1) (1)
annotation nsA:annotation (1) (1)
definition nsA:definition 0 1
unit nsA:unit 0 unbounded
unitType nsA:unitType 0 1
Collapse Child Attributes:
Name Type Default Value Use
id nsA:id (Optional)
units nsA:units (Optional)
title nsA:title (Optional)
abbreviation nsA:abbreviation (Optional)
symbol nsA:symbol (Optional)
name nsA:name (Optional)
parentSI nsA:parentSI (Optional)
isSI nsA:isSI (Optional)
unitType nsA:unitType (Optional)
multiplierToData nsA:multiplierToData 1.0 (Optional)
multiplierToSI nsA:multiplierToSI (Optional)
constantToSI nsA:constantToSI (Optional)
power nsA:power (Optional)