A description for the units of measure can be given both in <sw-units>. A unit of measure possesses a long and a short designation (<long-name> or <short-name>). The formatted output can be determined using the element <sw-unit-display>.
The element <si-unit> is used for mapping the <sw-unit> on a SI unit. This element possesses one attribute for each SI base unit and by which the associated exponent can be given. This is needed when working with tools that can compute using SI units.
This mapping on SI units makes it possible to compare the units of measure that are used.
It is possible to establish a reference to other units of measure (preferably SI units) by means of <sw-unit-ref>. The procedure for converting to this unit is given in <sw-unit-to-ref-method>. The procedure for converting from this units is given in <sw-unit-from-method>. These methods are specified as 6 parameters in accordance with <sw-asap-6-prm-method>.
Figure 9: Units of measure
The following example highlights the relationships:
<sw-units> <sw-unit> <long-name>kilometers per hour</long-name> <short-name>kmh</short-name> <sw-unit-display>km/h</sw-unit-display> <sw-unit-ref>mps</sw-unit-ref> <sw-unit-to-ref-method>0 1 0 0 3600 0</sw-unit-to-ref-method> <sw-unit-from-ref-method></sw-unit-from-ref-method> </sw-unit> <sw-unit> <long-name>Meters per second</long-name> <short-name>mps</short-name> <si-unit length-expo = "1" time-expo = "-1"></si-unit> <sw-unit-display></sw-unit-display> </sw-unit> </sw-units>