<conversion>

<conversion> defines how to calculate one unit of measure in terms of another. [2.3.9 The Unit Declaration]
組件 header — The TEI Header
屬性
calendar⚓︎ 指明該日期表示所使用的曆法計算系統。
Deprecated This feature will be withdrawn after 2024-11-11
狀態 非必備的
資料類型 1–∞ 次可出現: teidata.pointer 以空白鍵隔開
Schematron

<sch:rule context="tei:*[@calendar]">
<sch:assert test="string-length( normalize-space(.) ) gt 0"> @calendar indicates one or more
systems or calendars to which the date represented by the content of this element belongs,
but this <sch:name/> element has no textual content.</sch:assert>
</sch:rule>
fromUnit⚓︎ indicates a source unit of measure that is to be converted into another unit indicated in toUnit.
狀態 必備的
資料類型 teidata.pointer
toUnit⚓︎ the target unit of measurement for a conversion from a source unit referenced in fromUnit.
狀態 必備的
資料類型 teidata.pointer
可包含在於
header: unitDef
可包含 空白元素

The conversion element is designed to store information about converting from one unit of measurement to another. The formula attribute holds an XPath expression that indicates how the measurement system in fromUnit is converted to the system in toUnit. Do not confuse the usage of the dating attributes (from and to) in the examples with the attributes (fromUnit and toUnit) designed to reference units of measure.

例子
<conversion fromUnit="#shilling"
 toUnit="#penceformula="$fromUnit * 12from="1707"
 to="1971"/>
例子
<conversion fromUnit="#pound"
 toUnit="#shillingformula="$fromUnit * 20from="1701"
 to="1971"/>
Content model
<content>
 <empty/>
</content>
宣告
<rng:element name="conversion">
 <rng:ref name="att.global.attributes"/>
 <rng:ref name="att.global.rendition.attributes"/>
 <rng:ref name="att.global.linking.attributes"/>
 <rng:ref name="att.global.analytic.attributes"/>
 <rng:ref name="att.global.facs.attributes"/>
 <rng:ref name="att.global.change.attributes"/>
 <rng:ref name="att.global.responsibility.attributes"/>
 <rng:ref name="att.global.source.attributes"/>
 <rng:ref name="att.datable.attributes"/>
 <rng:ref name="att.datable.w3c.attributes"/>
 <rng:ref name="att.datable.iso.attributes"/>
 <rng:ref name="att.datable.custom.attributes"/>
 <rng:ref name="att.formula.attributes"/>
 <rng:ref name="att.locatable.attributes"/>
 <rng:optional>
  <rng:attribute name="calendar">
   <rng:list>
    <rng:oneOrMore>
     <rng:ref name="teidata.pointer"/>
    </rng:oneOrMore>
   </rng:list>
  </rng:attribute>
 </rng:optional>
 <rng:attribute name="fromUnit">
  <rng:ref name="teidata.pointer"/>
 </rng:attribute>
 <rng:attribute name="toUnit">
  <rng:ref name="teidata.pointer"/>
 </rng:attribute>
 <rng:empty/>
</rng:element>
element conversion
{
   att.global.attributes,
   att.global.rendition.attributes,
   att.global.linking.attributes,
   att.global.analytic.attributes,
   att.global.facs.attributes,
   att.global.change.attributes,
   att.global.responsibility.attributes,
   att.global.source.attributes,
   att.datable.attributes,
   att.datable.w3c.attributes,
   att.datable.iso.attributes,
   att.datable.custom.attributes,
   att.formula.attributes,
   att.locatable.attributes,
   attribute calendar { list { teidata.pointer+ } }?,
   attribute fromUnit { teidata.pointer },
   attribute toUnit { teidata.pointer },
   empty
}