<?xml version="1.0" encoding="UTF-8"?>
<metanorma xmlns="https://www.metanorma.org/ns/standoc" type="semantic" version="2.9.1" schema-version="v2.3.0" flavor="ribose">
<bibdata type="standard">
<title language="en" type="main">UnitsML specifications — Xml Usage</title>
<docidentifier primary="true" type="Ribose">36818(d)</docidentifier><docnumber>36818</docnumber><date type="updated"><on>2026-11-01</on></date><contributor><role type="author"/><organization>
<name>Ribose Asia Limited</name>
<abbreviation>Ribose</abbreviation></organization></contributor><contributor><role type="author"><description>committee</description></role><organization>
<name>Ribose Asia Limited</name>
<subdivision type="Committee" subtype="technical">
<name>CalConnect</name>
</subdivision></organization></contributor><contributor><role type="publisher"/><organization>
<name>Ribose Asia Limited</name>
<abbreviation>Ribose</abbreviation></organization></contributor><edition>1</edition><version>2026-11-01</version><language>en</language><script>Latn</script><status><stage>draft-standard</stage></status><copyright><from>2026</from><owner><organization>
<name>Ribose Asia Limited</name>
<abbreviation>Ribose</abbreviation></organization></owner></copyright><ext><doctype>standard</doctype><flavor>ribose</flavor></ext></bibdata><metanorma-extension><semantic-metadata><stage-published>false</stage-published></semantic-metadata>
<presentation-metadata><toc-heading-levels>2</toc-heading-levels><html-toc-heading-levels>2</html-toc-heading-levels><doc-toc-heading-levels>2</doc-toc-heading-levels><pdf-toc-heading-levels>2</pdf-toc-heading-levels></presentation-metadata></metanorma-extension>
<boilerplate><copyright-statement>

<clause id="_0bf1199e-8f6c-bc16-f9b0-78b3f1efec79" obligation="normative"><p id="_945067f2-795a-1e64-6f2b-25dd57c0f4d3">© Ribose Asia Limited 2026</p>
</clause>
</copyright-statement>

<license-statement>

<clause id="_3179d22c-816d-e694-6037-341f744bc6dc" obligation="normative">
<title id="_5ad8fb30-fcae-1072-87a2-407e6b4939ec">Warning for Drafts</title>
<p id="_a24807ee-0381-7ef8-1167-c3aacbb0fd73">This document is not a Ribose Standard. It is distributed for review and comment, and is subject to change without notice and may not be referred to as a Standard. Recipients of this draft are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</p>
</clause>
</license-statement>

<legal-statement>

<clause id="_7e0f3c63-3fc9-65cf-37f7-b94afa0dbc5d" obligation="normative"><p id="_50bbfa02-61c3-8332-bad8-61e7389d1808">All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting on the internet or an intranet, without prior written permission. Permission can be requested from the address below.</p>
</clause>
</legal-statement>

<feedback-statement>

<clause id="_d43a5e83-e752-e9bc-955e-4282a8ebb43a" obligation="normative"><p id="_0145a561-c9cc-a509-4784-ac2a1e6ea922" anchor="boilerplate-name" align="left">Ribose Asia Limited</p>

<p id="_80954cc8-1f49-9d20-5987-829595995a92" anchor="boilerplate-address" align="left">Suite 1, 8/F, New Henry House<br/> 10 Ice House Street<br/> Central<br/> Hong Kong<br/> <br/> <link target="mailto:copyright@ribose.com"/><br/> <link target="https://www.ribose.com">www.ribose.com</link></p>
</clause>
</feedback-statement>
</boilerplate><preface><foreword id="_6fea0b9d-06a2-a009-1780-8f2232f9c330" obligation="informative">
<title id="_41c9fad3-d4c1-eecc-4fad-f91704acc026">Foreword</title>
<p id="_2ad52be0-0c60-6b40-8894-73efc6983bcc">Two documents govern UnitsML XML: the base document — the generated XSD specification (unitsml/docs PR #9), specifying the SYNTAX of unitsml-v1.0.xsd, all 96 schema components, enumerations and examples — and THIS part, specifying the USAGE SEMANTICS: what conforming producers emit, what conforming consumers may infer, and what neither may invent. This part adds no elements and changes no schema; where the series needs what the schema cannot say, the gap is recorded and the path is Annex B.</p>
</foreword><introduction id="_d763d490-8cc3-112b-e41e-5a15d2c9f15c" obligation="informative">
<title id="_2b2e98d1-114a-3da4-8556-01ae0a724280">Introduction</title>
<p id="_f4a4a074-f1b9-8699-3c88-fd2f1c51dfa6">A schema tells you what is well-formed; only a usage contract tells you what is true. The schema permits any <tt>QuantityReference</tt> order — the register’s primary-reference rule says which one is the truth. The schema permits omitting digit metadata — the usage contract says importing without it loses exactness. This part is those statements, made normative.</p>
</introduction></preface><sections>

<clause id="_031bd2df-0b6a-3318-34b2-d84a93f6c11b" type="scope" obligation="normative">
<title id="_f70b6ff6-6131-0e24-81e1-850dbe94b63d">Scope</title>
<p id="_070ef577-7d9b-69c5-3b85-01602e3adec0">This document specifies: the emission contract for the element set; quantity-reference selection; conversion emission; cross-references from MathML; reading rules for foreign payloads; and the uncertainty-representation gap.</p>
</clause>



<terms id="_7be61f00-44c8-90f9-ce31-9b5ce9f5e39c" obligation="normative">
<title id="_dfb2eab2-f980-6365-3c47-81d0eb272962">Terms and definitions</title><p id="_e5876e78-fa42-efa9-f5ba-a93535689e8d">No terms and definitions are listed in this document.</p>
<dl id="_21cf47b8-5e8e-8e18-4eae-7a934e71b798"><dt>base document</dt>
<dd id="_8f11d0a0-e288-b064-02f5-e9fefbe72566"><p id="_37df6187-2448-278f-df32-85af88d5965d">the generated XSD specification; normative for XML syntax.</p>
</dd>
<dt>emission</dt>
<dd id="_096c5bb5-7e6c-e077-019e-e8f87c796e9b"><p id="_40c55753-5027-7cf5-4303-c0f25dd6d761">the production of UnitsML XML by a conforming producer.</p>
</dd>
<dt>xref</dt>
<dd id="_82b8404e-e214-80bd-d5d0-096bd36c113a"><p id="_32f518d7-ce7e-684e-26a4-59e1dfb8685a">the IDREF bond from a MathML unit symbol to the UnitsML <tt>xml:id</tt>.</p>
</dd>
<dt>deterministic reading</dt>
<dd id="_4155c96c-a558-386b-63b3-f109531b7b03"><p id="_5b1f9d26-f44b-54ea-dc93-6a9418bfd1fe">acceptance behavior for foreign payloads that is fully specified — accept, skip, or fail, never whim.</p>
</dd>
</dl>
</terms>

<clause id="_f79d374d-ce17-6e51-6e10-19f872648ad2" obligation="normative">
<title id="_577f0878-cbad-249b-c576-b43a5f664bb6">Conventions</title>
<p id="_35b96262-80eb-64db-7d74-a8af8e51fd29">Requirement language per CalConnect 36812. XML examples are illustrative; the XSD (base document) governs well-formedness.</p>
</clause>

<clause id="_303fc6fe-18f1-6c1b-de01-d1a6a19e8e00" obligation="normative">
<title id="_ab3a4a53-dc51-79cd-57ef-74c9500fc665">Emission contract</title>
<p id="_b2fe5f4d-8025-51c1-4537-b272ab5ce72d">Producers emit only elements and attributes the XSD defines, targeting the declared schema version. <tt>xml:id</tt> values are producer-allocated, unique per document, and stable across regenerations of the same input. The emitted element set: <tt>Unit</tt> (symbols, <tt>unitSystem</tt>, roots and prefixes, <tt>dimensionURL</tt>), <tt>Prefix</tt>, <tt>Quantity</tt> (names, symbols, <tt>quantityType</tt>, <tt>dimensionURL</tt>), <tt>Dimension</tt>, per-unit <tt>QuantityReference</tt> (0..*) and <tt>Conversions</tt> (0..1). <tt>SpecialConversionFrom</tt>/<tt>WSDLConversionFrom</tt> are never emitted synthetically.</p>

<example id="_3aa07f57-da3c-82d5-8477-c622cbb25226"><p id="_41108787-d6e5-d14f-6d50-65dd0a7041e5"><strong>Expected outcome.</strong> Regenerating the UnitsML for the same input yields byte-identical XML — same ids, same order, same attribute values. A producer whose regeneration flips element order or mints new ids is non-conforming.</p>
</example>
</clause>

<clause id="_801be6dc-acc0-c13a-cb69-7a78b2688d89" obligation="normative">
<title id="_6cc488a4-a0c6-14ac-60af-fc791882cb64">QuantityReference selection</title>
<p id="_849579b8-ba94-747c-6492-44a5d71d86c2"><tt>QuantityReference</tt> is 0..* per unit; a producer never emits positional order. Selection follows the CalConnect 36814 primary-reference rule: the <tt>primary: true</tt> entry when present; the caller’s asserted kind when one is stated.</p>

<example id="_37194acf-326a-5f72-4520-1c59ec5b9005"><p id="_a109dcce-5511-898e-ece7-0b9f8cd57add"><strong>Expected outcome.</strong> A joule emitted against the current register resolves to <tt>Quantity id="NISTq17"</tt> (energy). A producer emitting <tt>NISTq152</tt> (“Lagrange function”) from list position is non-conforming — the red member of the frozen vector pair.</p>
</example>
</clause>

<clause id="_1c126d6a-021e-eb0a-96ad-f17c74c4abc4" obligation="normative">
<title id="_378f0610-591b-4d66-4237-db577bc71d9c">Conversions emission</title>
<p id="_fa7526ed-5fee-0e46-384d-44775310aeb5"><tt>Conversions</tt> carries the full affine attribute set of CalConnect 36816 — <tt>initialUnit</tt>, <tt>initialAddend</tt>, <tt>multiplicand</tt>, <tt>divisor</tt>, <tt>finalAddend</tt>, <tt>exact</tt>, digit metadata — with decimal attributes as lexical strings. A producer never emits a conversion whose definition it cannot reproduce; register factors are emitted with their exact strings.</p>

<example id="_f7422503-db4a-ea1c-f1f4-9d5a5f01fbbc"><p id="_8f975434-4500-ea48-df71-e0ba2572f688"><strong>Expected outcome.</strong> The degree Celsius emission carries <tt>finalAddend="273.15" exact="true"</tt>; the percent-per-degree emission carries its full declared decimal and no <tt>exact</tt> attribute.</p>
</example>
</clause>

<clause id="_ee5396e6-56b5-ed5c-5516-4b25a9c65ef7" obligation="normative">
<title id="_28bbc77e-f96b-16ab-de73-2cf6a6b72df6">Cross-references from MathML</title>
<p id="_b050e47d-1bf6-c240-8a0c-14ce3966f057">MathML embeds unit symbols with <tt>xref</tt> pointing at the UnitsML <tt>xml:id</tt>; the linkage is the machine-readable bond between presentation and definition (the embedding clauses of the Plurimath input-language parts define the ASCII side).</p>

<example id="_da8b76ce-e144-5fe4-5ff0-d9cfa96e602a"><p id="_e947ca9a-738b-3aa1-82c5-dfb26b35f173"><strong>Expected outcome.</strong> <tt>parse('mg')</tt> rendered to MathML emits the milligram symbol with an <tt>xref</tt> resolving, inside the document, to the milligram <tt>Unit</tt> element — the reader can walk from presentation to definition without name matching.</p>
</example>
</clause>

<clause id="_5ce2d0df-fdd8-95b2-def0-420df14c9c32" obligation="normative">
<title id="_862c1737-ba6a-7fbc-e216-e6ed4adfe2e5">Reading rules and determinism</title>
<p id="_bbf535da-d5fa-f7aa-0941-c195e88b9f82">Readers tolerate foreign-payload defects deterministically: duplicate lowercase attributes (the openCDD <tt>finaladdend</tt> beside <tt>finalAddend</tt>) are accepted with the camel-case value prevailing on read and never reproduced on write; unrecognized elements are skipped, not fatal; recognized names with malformed shapes are fatal.</p>

<example id="_b3fdb877-ed08-56fc-58ef-6911dda552b0"><p id="_6fc6e1da-044a-3bdb-3eea-5245c09f8ad9"><strong>Expected outcome.</strong> The known degree-Celsius payload defect (one duplicate attribute) is reported in the coverage report, accepted on read, and absent from every emission this series produces.</p>
</example>
</clause>

<clause id="_376a0cab-d322-b2f3-adc1-79f17162fd2d" obligation="normative">
<title id="_5e697a1e-620a-81c2-e401-1df848bcb65b">The uncertainty gap</title>
<p id="_e9d07acf-6ea5-dcf5-99e7-dbb2e06260da">UnitsML 1.0 has no first-class uncertainty element. Measured values travel in the math layer (Plurimath 2). This part does not invent one; Annex B records the proposal shape for the WG.</p>
</clause>

<clause id="_4badf964-9845-8114-34f8-11937f450eb8" obligation="normative">
<title id="_3d8e05f5-356f-a035-3be4-914ad1b08fa2">Conformance</title>
<p id="_55360b5c-46f9-a78b-1f54-01231293c848">Conformance class <tt>parse/render</tt> includes this part for emission and reading; conversion round-trips additionally require <tt>quantity-conversion</tt>. <xref target="annex-validation"/> defines the validation profile; <xref target="annex-proposal"/> discusses a measurement-result element; CalConnect 36819 freezes the round-trip vectors.</p>
</clause>






</sections><annex id="_86f67a35-808b-ad42-eaaf-dea1f0aa7c5f" anchor="annex-validation" obligation="normative">
<title id="_32313666-d764-90e4-1320-5e0075d44980">Annex A (informative): validation profile</title>
<p id="_1a4026a3-7cb7-7aaa-beed-d6cbf78465d7">Emitted documents validate against the XSD; every <tt>xref</tt> resolves; every <tt>QuantityReference</tt>/<tt>Conversions</tt> value round-trips through the CalConnect 36816 semantics; document regeneration from the same input is byte-stable.</p>
</annex><annex id="_a38bd323-7fc6-072a-c9c9-4551e911b804" anchor="annex-proposal" obligation="normative">
<title id="_e335a6f4-a6b9-603a-02c1-8aae91082f9f">Annex B (informative): proposal — a measurement-result element</title>
<p id="_4c27a381-fe7e-cd3d-3f08-391f727bc636">A sibling of <tt>QuantityReference</tt> on <tt>Quantity</tt>-carrying elements, or a child of <tt>Unit</tt>:</p>

<sourcecode id="_1dd5bbaf-1e36-83ec-ea5a-c794a690052f"><body>MeasurementResult: category (standard | expanded | coverage-interval),
  value (decimal string), magnitude?, k?, p?, lower?, upper?,
  intervalKind?, distribution? (JCGM 101 family + parameters),
  exact (boolean), digits metadata</body></sourcecode>


<p id="_9f0f59fc-c65d-e5c7-d3d2-e975403a7d43">Adoption is a WG decision; until adopted, this series carries uncertainty in the math layer only.</p>
</annex><bibliography><references id="_197cab2d-b465-62ff-3537-dc8687b1db7e" normative="true" obligation="informative">
<title id="_270c5ee6-077e-f285-ff95-287984a30140">Normative references</title><p id="_49996d2b-65c1-916b-9bbf-42b933aa0025">The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
<bibitem anchor="xsd-spec" id="_45f9215d-d1a8-e8d4-7fac-45229b98fd02"><formattedref format="application/x-isodoc+xml">(base document)</formattedref><docidentifier>generated XSD specification</docidentifier><language>en</language><script>Latn</script></bibitem>
<bibitem anchor="unitsml-xsd" id="_71263232-2cc8-629e-0d14-d6d597760d08"><formattedref format="application/x-isodoc+xml">(unitsml-v1.0.xsd)</formattedref><docidentifier>UnitsML 1.0 XSD</docidentifier><docnumber>1.0 XSD</docnumber><language>en</language><script>Latn</script></bibitem>
</references><references id="_18f63255-0abe-60c3-0a18-335ac3f579f6" normative="false" obligation="informative">
<title id="_50ceb1e1-516f-2673-d73d-4f0c58b4d023">Bibliography</title><bibitem anchor="docs-pr9" id="_3ce592e4-c547-097f-e909-04f0ec821955">
  <formattedref format="application/x-isodoc+xml">(base document); unitsml/unitsml-ruby#92; unitsml/unitsdb#139 (reading-rule provenance)</formattedref>
  <docidentifier>unitsml/docs PR #9</docidentifier>
  <docnumber>9</docnumber>
  <language>en</language>
  <script>Latn</script>
</bibitem>

</references></bibliography>
</metanorma>
