The definition of a unit is in the following format:
<Unit Name="name">
<ConversionMap>name</ConversionMap>
<Locale Name="name">
<DisplayString>string</DisplayString>
<DisplaySymbol>string</DisplaySymbol>
</Locale>
</Unit>
XML objects for unit definitions
XML object |
Description |
---|---|
Unit |
Definition of the unit. A Unit object includes one or more Locale objects. Name—Locale-independent name for the unit. Use this name as the value of the From or To attribute in the definitions of conversion calculations for this unit. |
ConversionMap |
Name of the conversion definition. Use the value of the Name attribute of the applicable UnitConversionMap object. For more information, see Conversion calculation XML definition. |
Locale |
Definition of the locale. A Locale object includes a DisplayString and a DisplaySymbol definition. Locale Name—International standard locale name, in the format xx-XX. For more information, see Supported locales and their abbreviations. |
DisplayString |
Display string for the unit in the specified locale. |
DisplaySymbol |
Symbol for the unit in the specified locale. This symbol is displayed in the Item Editor for item types that allow units and in the Layout tab. |
XML example
<Unit Name="in">
<ConversionMap>Length</ConversionMap>
<Locale Name="en-US">
<DisplayString>Inches</DisplayString>
<DisplaySymbol>in</DisplaySymbol>
</Locale>
</Unit>
Copyright © 2007, 2016 Oracle and/or its affiliates. All rights reserved.