QuantityConversion DITA domain

Objective

Provide a data model for quantities (a value plus a unit of measure) that is similar to a glossary entry. By defining a quantity once, it can be referenced repeatedly as needed. Content can explicitly reference the quantity and alternative units of measure. Commonly, this would be instances where SI and US customary units must both be provided; for example, “The length of a football (soccer) pitch must be between 90m (100 yards) and 120m (130 yards)”.

Alternately, the element can implicitly call for alternate units of measure and localized output generators can provide the one appropriate one. Further, output generators can be configured to automatically provide conversions, even if alternate units of measure are not expressed in the XML.

Example/Summary

<quantity>
<datauom unit="
[picklist]" abbrev="[yes|no]"/>
<value>
N.M</value>
<mainuom unit="
[picklist]" abbrev="[yes|no]"/>
<altuom unit="
[picklist]" abbrev="[yes|no]"/>
</quantity>

<quantity> Content Model

Doctype Content model Contained by
[Any, all] ( (datauom) (any number) then (value) (one) then (mainuom) (one) then (altuom) (any number) ) [same as <ph>]

<datauom> Attributes

Name Description Data type Default value Required?
unit Indicates an SI or US customary unit. Picklist of the seven SI base units and one each of the underived US customary units, plus temperature units. ( second | meter | m2 | m3 | kilogram | ampere | kelvin | mole | candela | celsius | foot | ft2 | ft3 | nauticalmile | liter | floz | drypint | ounce | troygrain | fahrenheit ) [?] Yes
visible Indicates that the source-data quantity renders in output. ( yes | no ) no No
abbrev Toggles abbreviation of the unit of measure (@unit). ( yes | no ) yes No

<mainuom> Attributes

Name Description Data type Default value Required?
unit Indicates an SI or US customary unit. Picklist of the seven SI base units and one each of the underived US customary units, plus temperature units. ( second | meter | m2 | m3 | kilogram | ampere | kelvin | mole | candela | celsius | foot | ft2 | ft3 | nauticalmile | liter | floz | drypint | ounce | troygrain | fahrenheit ) [?] Yes
abbrev Toggles abbreviation of the unit of measure (@unit). ( yes | no ) yes No

<altuom> Attributes

Perhaps quantities and their conversion might be best constrained by the unit category or type. They would have the same children as above model.

Quantity type Alternative element name Available @unit data types
Length <lenquantity> ( meter | foot |nauticalmile )
Area <areaquantity> ( m2 | ft2 )
Volume1 <volquantity> ( m3 | liter| ft3 | floz | drypint )
Time <timequantity> ( second | [prefix multipliers, like ms?] )
Mass/Weight2 <massquantity> ( kilogram | ounce | troygrain )
Temperature <tempquantity> ( celsius | fahrenheit )

Footnotes

  1. Fluid and dry volumes are combined to keep the model simple; conversion in output would be constrained only to valid exchanges and, if the altuom@unit in a <FOOquantity> has no conversion for the uom@unit, no alternate value+unit pair is rendered in output. [Yes, the XSLT code to do this proposed automatic conversion and insertion is not trivial! 😊]
  2. From a tech-writing perspective, I do not see a case for making a distinction between mass and weight. Aerospace industry uses S1000 (I think) and they can develop their own conversion domain themselves, for quantities in micro- or zero gravity (varied weight, static mass)! 😜
Posted in Design, Technology.