2.5. The units elementΒΆ
A units element information item (referred to in this specification as a units element) is an element in the CellML namespace with a local name equal to units, which appears as a child of a model element.
Every
unitselement MUST contain anameattribute.The value of the
nameattribute MUST be a CellML identifier.The value of the
nameattribute MUST NOT be identical to the value of thenameattribute of any otherunitselement orimport unitselement in the CellML infoset.
The value of the
nameattribute MUST NOT be identical to the name of any of the units listed in Table 3.1: Built-in units (see 3.2 Units references).
A
unitselement MAY contain one or moreunitelement children.
See more
The best way to understand how units work is to read the informative sections within the 2.6 The unit element in the next section, which defines their child unit items.
The following examples show examples of what is not permitted when defining units items.
<!-- The units name attribute is not a valid CellML identifier. -->
<units name="I'm not valid!"> ... </units>
<!-- Duplicted local units names are not allowed. -->
<units name="duplicatedName"> ... </units>
<units name="duplicatedName"> ... </units>
<!-- Duplicated name of an imported units item is not allowed. -->
<import xlink:href="handyUnitsForImport.cellml">
<units units_ref="myCustomUnits" name="duplicatedName">
</import>
<!-- Duplicating the name of built-in units is not allowed. -->
<units name="metre"> ... </units>