element unitType

element {http://www.xml-cml.org/schema/stmml}unitType

Abstractfalse (This can be used in an instance)
Nillablefalse (Instance values cannot use xsi:nil)
Target Namespacehttp://www.xml-cml.org/schema/stmml
Declared Namespacesxmlns:sch=http://www.ascc.net/xml/schematron
xmlns:xsd=http://www.w3.org/2001/XMLSchema
xmlns=http://www.xml-cml.org/schema/stmml


Source

<xsd:element name="unitType" id="el.unitType">
    <
xsd:annotation>
        <
xsd:documentation>
            <
div class="summary">An element containing the description of a scientific unit</div>
            <
div class="description">
                <
p>
Mandatory for SI Units,
optional for nonSI units since they should be able to obtain this
from their parent. For complex derived units without parents it may be
useful.
                
</p>
                <
p>Used within a unitList</p>
                <
p>Distinguish carefully from
                    
<a href="st.unitsType">unitsType</a>
which is primarily used for attributes describing the units that elements
carry
                
</p>
            </
div>
            <
div class="example">
                <
pre>
<stm:unitList xmlns:stm="http://www.xml-cml.org/schema/stmml">

<!-- ======================================================================= -->
<!-- ========================= fundamental types =========================== -->
<!-- ======================================================================= -->

<stm:unitType id="length" name="length">
<stm:dimension name="length" power="1"/>
</stm:unitType>

<stm:unitType id="time" name="time">
<stm:dimension name="time" power="1"/>
</stm:unitType>

<!-- ... -->

<stm:unitType id="dimensionless" name="dimensionless">
<stm:dimension name="dimensionless" power="1"/>
</stm:unitType>

<!-- ======================================================================= -->
<!-- ========================== derived types ============================== -->
<!-- ======================================================================= -->

<stm:unitType id="acceleration" name="acceleration">
<stm:dimension name="length" power="1"/>
<stm:dimension name="time" power="-2"/>
</stm:unitType>

<!-- ... -->

<!-- ======================================================================= -->
<!-- ====================== fundamental SI units =========================== -->
<!-- ======================================================================= -->

<stm:unit id="second" name="second" unitType="time">
<stm:description>The SI unit of time</stm:description>
</stm:unit>

<stm:unit id="meter" name="meter" unitType="length"
abbreviation="m">
<stm:description>The SI unit of length</stm:description>
</stm:unit>

<!-- ... -->

<stm:unit id="kg" name="nameless" unitType="dimensionless"
abbreviation="nodim">
<stm:description>A fictitious parent for dimensionless units</stm:description>
</stm:unit>

<!-- ======================================================================= -->
<!-- ===================== derived SI units ================================ -->
<!-- ======================================================================= -->

<stm:unit id="newton" name="newton" unitType="force">
<stm:description>The SI unit of force</stm:description>
</stm:unit>

<!-- ... -->

<!-- multiples of fundamental SI units -->

<stm:unit id="g" name="gram" unitType="mass"
parentSI="kg"
multiplierToSI="0.001"
abbreviation="g">
<stm:description>0.001 kg. </stm:description>
</stm:unit>

<stm:unit id="celsius" name="Celsius" parentSI="k"
multiplierToSI="1"
constantToSI="273.18">
<stm:description><p>A common unit of temperature</p></stm:description>
</stm:unit>

<!-- fundamental non-SI units -->

<stm:unit id="inch" name="inch" parentSI="meter"
abbreviation="in"
multiplierToSI="0.0254" >
<stm:description>An imperial measure of length</stm:description>
</stm:unit>

<!-- derived non-SI units -->

<stm:unit id="l" name="litre" unitType="volume"
parentSI="meterCubed"
abbreviation="l"
multiplierToSI="0.001">
<stm:description>Nearly 1 dm**3 This is not quite exact</stm:description>
</stm:unit>

<!-- ... -->

<stm:unit id="fahr" name="fahrenheit" parentSI="k"
abbreviation="F"
multiplierToSI="0.55555555555555555"
constantToSI="-17.777777777777777777">
<stm:description>An obsolescent unit of temperature still used in popular
meteorology</stm:description>
</stm:unit>

</stm:unitList>
                
</pre>
            </
div>
        </
xsd:documentation>
    </
xsd:annotation>
    <
xsd:complexType>
        <
xsd:sequence>
            <
xsd:element ref="dimension" minOccurs="0" maxOccurs="unbounded"/>
        </
xsd:sequence>
        <
xsd:attribute name="id" type="idType" use="required"/>
        <
xsd:attribute name="name" type="xsd:string" use="required"/>
    </
xsd:complexType>
</
xsd:element>


Documentation

An element containing the description of a scientific unit

Mandatory for SI Units, optional for nonSI units since they should be able to obtain this from their parent. For complex derived units without parents it may be useful.

Used within a unitList

Distinguish carefully from unitsType which is primarily used for attributes describing the units that elements carry

<stm:unitList xmlns:stm="http://www.xml-cml.org/schema/stmml">
<!-- ======================================================================= -->
<!-- ========================= fundamental types =========================== -->
<!-- ======================================================================= -->
<stm:unitType id="length" name="length">
  <stm:dimension name="length" power="1"/>
</stm:unitType>
<stm:unitType id="time" name="time">
  <stm:dimension name="time" power="1"/>
</stm:unitType>
<!-- ... -->
<stm:unitType id="dimensionless" name="dimensionless">
  <stm:dimension name="dimensionless" power="1"/>
</stm:unitType>
<!-- ======================================================================= -->
<!-- ========================== derived types ============================== -->
<!-- ======================================================================= -->
<stm:unitType id="acceleration" name="acceleration">
  <stm:dimension name="length" power="1"/>
  <stm:dimension name="time" power="-2"/>
</stm:unitType>
<!-- ... -->
<!-- ======================================================================= -->
<!-- ====================== fundamental SI units =========================== -->
<!-- ======================================================================= -->
<stm:unit id="second" name="second" unitType="time">
  <stm:description>The SI unit of time</stm:description>
</stm:unit>
<stm:unit id="meter" name="meter" unitType="length"
  abbreviation="m">
  <stm:description>The SI unit of length</stm:description>
</stm:unit>
<!-- ... -->
<stm:unit id="kg" name="nameless" unitType="dimensionless"
  abbreviation="nodim">
  <stm:description>A fictitious parent for dimensionless units</stm:description>
</stm:unit>
<!-- ======================================================================= -->
<!-- ===================== derived SI units ================================ -->
<!-- ======================================================================= -->
<stm:unit id="newton" name="newton" unitType="force">
  <stm:description>The SI unit of force</stm:description>
</stm:unit>
<!-- ... -->
<!-- multiples of fundamental SI units -->
<stm:unit id="g" name="gram" unitType="mass"
  parentSI="kg"
  multiplierToSI="0.001"
  abbreviation="g">
  <stm:description>0.001 kg. </stm:description>
</stm:unit>
<stm:unit id="celsius" name="Celsius" parentSI="k"
  multiplierToSI="1"
  constantToSI="273.18">
  <stm:description><p>A common unit of temperature</p></stm:description>
</stm:unit>
<!-- fundamental non-SI units -->
<stm:unit id="inch" name="inch" parentSI="meter"
   abbreviation="in"
  multiplierToSI="0.0254" >
  <stm:description>An imperial measure of length</stm:description>
</stm:unit>
<!-- derived non-SI units -->
<stm:unit id="l" name="litre" unitType="volume"
   parentSI="meterCubed"
   abbreviation="l"
   multiplierToSI="0.001">
  <stm:description>Nearly 1 dm**3 This is not quite exact</stm:description>
</stm:unit>
<!-- ... -->
<stm:unit id="fahr" name="fahrenheit" parentSI="k"
   abbreviation="F"
  multiplierToSI="0.55555555555555555"
  constantToSI="-17.777777777777777777">
  <stm:description>An obsolescent unit of temperature still used in popular
  meteorology</stm:description>
</stm:unit>
</stm:unitList>


element unitType


Stylus Studio XML Schema Library Home
Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio®, a product from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2006 All Rights Reserved.