metanorma / bipm-si-brochure

SI Brochure edition 9, semantic encoded version (WARNING: DRAFT)
3 stars 0 forks source link

(URGENT) UnitsML encoding missing from resulting Semantic XML #216

Closed ronaldtse closed 1 year ago

ronaldtse commented 1 year ago

All UnitsML units are now missing from the Semantic XML, including simple units and composed units.

This probably has to do with the recent switch to Plurimath.

opoudjis commented 1 year ago

I'm not getting none at all, but I am not getting many:

<misc-container><UnitsML xmlns="https://schema.unitsml.org/unitsml/1.0"><UnitSet><Unit xml:id="U_NISTu1" dimensionURL="#NISTd1">
<UnitSystem name="SI" type="SI_derived" xml:lang="en-US"/>
<UnitName xml:lang="en">meter</UnitName>
<UnitSymbol type="HTML">m</UnitSymbol>
<UnitSymbol type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mi mathvariant="normal">m</mi></mrow></math>
</UnitSymbol>

</Unit></UnitSet><QuantitySet><Quantity xml:id="NISTq4" dimensionURL="#NISTd4" quantityType="base">
<QuantityName xml:lang="en-US">electric current</QuantityName>
</Quantity></QuantitySet><DimensionSet><Dimension xml:id="NISTd1">
<Length symbol="L" powerNumerator="1"/>
</Dimension></DimensionSet><PrefixSet><Prefix prefixBase="10" prefixPower="3" xml:id="NISTp10_3">
  <PrefixName xml:lang="en">kilo</PrefixName>
  <PrefixSymbol type="ASCII">k</PrefixSymbol>
  <PrefixSymbol type="unicode">k</PrefixSymbol>
  <PrefixSymbol type="LaTeX">k</PrefixSymbol>
  <PrefixSymbol type="HTML">k</PrefixSymbol>
</Prefix></PrefixSet></UnitsML></misc-container>

What has happened is that the id attribute for UnitsML expressions has changed into xml:id, so they are not being uniquely identified in the hash table picking them up and moving them to misc-container. That, I do not want, since those expressions are being linked to...

opoudjis commented 1 year ago

No, the xml:id was there from the start. What is clearly happening is that Nokogiri is more careful now about prefixing namespaces to ids than it used to be...