att.formula

att.formula provides attributes for defining a mathematical formula. [2.3.9 The Unit Declaration]
Módulotei — The TEI Infrastructure
Miembrosconversion
AtributosAtributos
formulaA formula is provided to describe a mathematical calculation such as a conversion between measurement systems.
Estado Opcional
Tipo de datos teidata.xpath
Ejemplo
<encodingDesc>
 <unitDecl>
  <unitDef xml:id="stadiumtype="linear">
   <label>stadium</label>
   <placeName ref="#rome"/>
   <conversion fromUnit="#pes"
    toUnit="#stadiumformula="$fromUnit * 625"/>

   <desc>The stadium was a Roman unit of linear measurement equivalent to 625 pedes, or Roman feet.</desc>
  </unitDef>
 </unitDecl>
</encodingDesc>
Ejemplo
<encodingDesc>
 <unitDecl>
  <unitDef xml:id="wmwtype="power">
   <label>whatmeworry</label>
   <conversion fromUnit="#hpk"
    toUnit="#wmwformula="$fromUnit * 1"/>

   <desc>In the Potrzebie system of measures as introduced by Donald Knuth, the whatmeworry unit of power is equivalent to one hah per kovac.</desc>
  </unitDef>
  <unitDef xml:id="kwmwtype="power">
   <label>kilowhatmeworry</label>
   <conversion fromUnit="#wmw"
    toUnit="#kwmwformula="$fromUnit div 1000"/>

   <desc>The kilowhatmeworry is equivalent to 1000 whatmeworries.</desc>
  </unitDef>
  <unitDef xml:id="aptype="power">
   <label>kilowhatmeworry</label>
   <conversion fromUnit="#kwmw"
    toUnit="#apformula="$fromUnit div 100"/>

   <desc>One unit of aeolipower (A.P.) is equivalent to 100 kilowhatmeworries.</desc>
  </unitDef>
 </unitDecl>
</encodingDesc>
Ejemplo
<conversion fromUnit="#furlongsPerFortnight"
 toUnit="#milesPerHour"
 formula="$fromUnit cast as xs:decimal * 0.000372"/>
Ejemplo
<conversion fromUnit="#deciday"
 toUnit="hour"
 formula="$fromUnit cast as xs:decimal * 144 div 60"/>