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

language attribute is not in an array #49

Open
ronaldtse opened this issue Apr 19, 2023 · 2 comments
Open

language attribute is not in an array #49

ronaldtse opened this issue Apr 19, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@ronaldtse
Copy link
Contributor

ronaldtse commented Apr 19, 2023

Right now, Relaton returns the same item regardless of the input syntax, and already provides the French content:

$ bundle exec relaton fetch "CIPM Recommandation 5 (1989)"
<bibdata type="proceedings" schema-version="v1.2.3">
  <fetched>2023-04-19</fetched>
  <title format="text/plain" language="en" script="Latn">The International Temperature Scale of 1990</title>
  <title format="text/plain" language="fr" script="Latn">L’Échelle internationale de température de 1990</title>
  <uri type="citation" language="en" script="Latn">https://www.bipm.org/en/committees/ci/cipm/78-1989/resolution-5</uri>
  <uri type="citation" language="fr" script="Latn">https://www.bipm.org/fr/committees/ci/cipm/78-1989/resolution-5</uri>
  <uri type="src" language="en" script="Latn">https://raw.githubusercontent.com/metanorma/bipm-data-outcomes/main/cipm/meetings-en/meeting-78.yml</uri>
  <uri type="src" language="fr" script="Latn">https://raw.githubusercontent.com/metanorma/bipm-data-outcomes/main/cipm/meetings-fr/meeting-78.yml</uri>
  <uri type="pdf">https://www.bipm.org/documents/20126/17315032/CIPM78.pdf/078200cd-d8b2-f33b-da22-a2a3badeee10</uri>
  <docidentifier type="BIPM" primary="true">CIPM -- Recommendation 5 (1989)</docidentifier>
  <docidentifier type="BIPM" primary="true" language="en" script="Latn">CIPM -- Recommendation 5 (1989)</docidentifier>
  <docidentifier type="BIPM" primary="true" language="fr" script="Latn">CIPM -- Recommandation 5 (1989)</docidentifier>
  <docnumber>CIPM -- Recommendation 5 (1989)</docnumber>
  <date type="published">
    <on>1989-09-28</on>
  </date>
  <contributor>
    <role type="publisher"/>
    <organization>
      <name>Bureau International des Poids et Mesures</name>
      <abbreviation>BIPM</abbreviation>
      <uri>www.bipm.org</uri>
    </organization>
  </contributor>
  <contributor>
    <role type="author"/>
    <organization>
      <name language="en" script="Latn">International Committee for Weights and Measures</name>
      <name language="fr" script="Latn">Comité International des Poids et Mesures</name>
      <abbreviation>CIPM</abbreviation>
    </organization>
  </contributor>
  <language>en</language>
  <language>fr</language>
  <script>Latn</script>
  <place>
    <city>Paris</city>
  </place>
  <ext schema-version="v1.0.0">
    <doctype>recommendation</doctype>
    <structuredidentifier>
      <docnumber>5</docnumber>
    </structuredidentifier>
  </ext>
</bibdata>

In this output, language is not in an array. Since there are multiple languages, it probably should be an array or contains an array of codes.

  <language>en</language>
  <language>fr</language>

Originally from: metanorma/metanorma-bipm#288

@ronaldtse ronaldtse added the bug Something isn't working label Apr 19, 2023
@ronaldtse
Copy link
Contributor Author

I'm seeing that contributor is also not in an array, which is also strange...

@andrew2net
Copy link
Contributor

@ronaldtse what does "not in array" mean?
RelatonXML grammar defines the language element as zero or more elements

  <define name="BibliographicItem">
    ...
    <zeroOrMore>
      <ref name="language"/>
    </zeroOrMore>
    ...
  </define>
  ...
  <define name="language">
    <element name="language">
      <text/>
    </element>
  </define>
  ...

Elements like title and organization/name have a language attribute. In case we have content in many languages, we use multiple elements with language attributes. The language attribute denotes the content translation. I don't understand how the language attribute could be an array.

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

2 participants