relaton / relaton-iso

RelatonIso: ISO Standards metadata using the BibliographicItem model
BSD 2-Clause "Simplified" License
2 stars 1 forks source link

Request to add language-specific identifier in output #148

Closed opoudjis closed 1 year ago

opoudjis commented 1 year ago

In https://github.com/metanorma/metanorma-bsi/issues/310, we have a BSI document based on an ISO document. The ISO document is cited in the document header using not the language-neutral identifier, ISO 44001:2017, but the English-language version specifically, ISO 44001:2017(E).

This is somewhat tricky, because I'm not convinced that ISO 44001:2017 is the same document as ISO 44001:2017, but could you add to the document identifiers for relaton-iso an identifier of type "iso-reference", generated with the default assumption of English?

<docidentifier type="iso-reference">ISO 44001:2017(E)</docidentifier>

To generate that identifier, use:

Pubid::Iso::Identifier.create(**(params.merge(language: "en"))).to_s(format: :ref_num_short)

where params are whatever you are currently passing to Pubid::Iso::Identifier.create

ronaldtse commented 1 year ago

Is there a typo here?

I'm not convinced that ISO 44001:2017 is the same document as ISO 44001:2017

opoudjis commented 1 year ago

I meant, as 2017(E).

ronaldtse commented 1 year ago

@andrew2net this ticket is now active. @opoudjis wants to have available the docidentifier of:

Whether the document has an English and/or a French version will depend on the metadata of the document (ISO website).

andrew2net commented 1 year ago

@opoudjis fixed in v1.15.2

$ relaton fetch 'ISO 44001:2017'
[relaton-iso] ("ISO 44001:2017") Fetching from ISO...
[relaton-iso] ("ISO 44001:2017") Found exact match.
<bibdata type="standard" schema-version="v1.2.3">
  <fetched>2023-05-10</fetched>
  <title type="title-intro" format="text/plain" language="en" script="Latn">Collaborative business relationship management systems</title>
  <title type="title-main" format="text/plain" language="en" script="Latn">Requirements and framework</title>
  <title type="main" format="text/plain" language="en" script="Latn">Collaborative business relationship management systems - Requirements and framework</title>
  <title type="title-intro" format="text/plain" language="fr" script="Latn">Systèmes de management collaboratif d'une relation d'affaire</title>
  <title type="title-main" format="text/plain" language="fr" script="Latn">Exigences et cadre de travail</title>
  <title type="main" format="text/plain" language="fr" script="Latn">Systèmes de management collaboratif d'une relation d'affaire - Exigences et cadre de travail</title>
  <uri type="src">https://www.iso.org/standard/72798.html</uri>
  <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:72798:en</uri>
  <uri type="rss">https://www.iso.org/contents/data/standard/07/27/72798.detail.rss</uri>
  <docidentifier type="ISO" primary="true">ISO 44001:2017</docidentifier>
  <docidentifier type="iso-reference">ISO 44001:2017(E)</docidentifier>
  <docidentifier type="URN">urn:iso:std:iso:44001:stage-90.93:ed-1</docidentifier>
  ...