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
units
element MUST contain aname
attribute.The value of the
name
attribute MUST be a CellML identifier.The value of the
name
attribute MUST NOT be identical to the value of thename
attribute of any otherunits
element orimport units
element in the CellML infoset.
The value of the
name
attribute 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
units
element MAY contain one or moreunit
element 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>