Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BIPM Feedback: French page 37, 2. line: reference to page number missing (inter-doc xrefs) #68

Closed
ronaldtse opened this issue Jan 1, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@ronaldtse
Copy link
Contributor

ronaldtse commented Jan 1, 2021

This was originally reported here: #41

Original:

Screen Shot 2021-01-01 at 11 44 08 PM

Generated:
Screen Shot 2021-01-02 at 1 16 08 AM

We're missing the page reference. This is a in-collection inter-document cross reference, pointing to the English version of the SI Brochure.

The source is:

En anglais, même lorsque la valeur d’une grandeur est utilisée comme adjectif, il convient
de laisser une espace entre la valeur numérique et le symbole de l’unité. Ce n’est que
lorsque l’on écrit le nom de l’unité en toutes lettres que l’on applique les règles
grammaticales ordinaires (voir un exemple en anglais page <<english-doc,anchor=english_example>>).

Semantic XML source:

<p id="_e9277bf0-ef2f-49f3-a909-bc97502c6052_si-brochure-fr">
  En anglais, m&#xEA;me lorsque la valeur d&#x2019;une grandeur est
  utilis&#xE9;e comme adjectif, il convient
  de laisser une espace entre la valeur num&#xE9;rique et le symbole de
  l&#x2019;unit&#xE9;. Ce n&#x2019;est que lorsque l&#x2019;on &#xE9;crit le nom
  de l&#x2019;unit&#xE9; en toutes lettres que l&#x2019;on applique les
  r&#xE8;gles grammaticales ordinaires (voir un exemple en anglais page
  <eref type="inline" bibitemid="english-doc_si-brochure-fr"
  citeas="si-brochure-en">
  <localityStack>
    <locality type="anchor">
      <referenceFrom>english_example</referenceFrom>
    </locality>
  </localityStack>
</eref>
  ).
</p>

I've verified that the generated bilingual XML does not contain this anchor english_example.

In the source where the anchor is used:

==== Quantity symbols and unit symbols

Unit symbols must not be used to provide specific information about the quantity
and should never be the sole source of information on the quantity. Units are never
qualified by further information about the nature of the quantity; any extra information
on the nature of the quantity should be attached to the quantity symbol and not to the unit symbol.

[[english_example]]
[NOTE]
====
For example: The maximum electric potential difference is stem:[ii(U)_("max") = 1000 " "rm(V)] 
but not stem:[ii(U) = 1000 " "rm(ii(V)_(max))]. The mass fraction of copper in the sample of
silicon is stem:[w("Cu") = 1.3 xx 10^(-6)] but not stem:[1.3 xx 10^(-6) " "rm(w)//rm(w)].
====

The generated Semantic XML of this clause is:

<clause id="_quantity_symbols_and_unit_symbols_si-brochure-en" obligation="normative">
  <title>Quantity symbols and unit symbols</title>
  <p id="_83bd03bb-6870-4189-be7b-04fba7b05d6c_si-brochure-en">
    Unit symbols must not be used to provide specific information about the
    quantity and should never be the sole source of information on the quantity.
    Units are never qualified by further information about the nature of the
    quantity; any extra information on the nature of the quantity should be
    attached to the quantity symbol and not to the unit symbol.
  </p>
  <note id="english_example_si-brochure-en">
    <p id="_3d63f17a-7388-401e-ae5b-6b368dac8415_si-brochure-en">
      For example: The maximum electric potential difference is
      <stem type="MathML">
      <math xmlns="http://www.w3.org/1998/Math/MathML">
        <msub>
          <mrow>

The note ID becomes english_example_si-brochure-en here, that's why the anchor is missing.

@ronaldtse ronaldtse added the bug Something isn't working label Jan 1, 2021
@opoudjis
Copy link
Contributor

opoudjis commented Jan 2, 2021

The note ID becoming that is correct behaviour, that's avoiding the IDs not being unique. The anchor however was meant to be updated too when that was implemented. I'll fix it.

@opoudjis
Copy link
Contributor

opoudjis commented Jan 2, 2021

metanorma test has cross-reference to ISO amendment clause, which was unimplemented: having to implement it.

@opoudjis
Copy link
Contributor

opoudjis commented Jan 2, 2021

We test all anchors in document to see if they exist for an anchor crossreference (eref//location[@type = 'anchor'], directly invoking an id). But the anchors stored are keyed against labels, since they are invoked from location labels in locationStack in the case that they are not anchor crossreferences, but reference a label instead (e.g. eref//location[@type = 'clause']). So for anchor crossreference validation, we store all ids whether they have unambiguous labels or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants