relaton / relaton-iso

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

Breakage in status of URN generated #121

Closed opoudjis closed 2 years ago

opoudjis commented 2 years ago

relaton fetch "ISO 123"

is returning

<docidentifier type="URN">urn:iso:std:iso:123:stage-60.60</docidentifier>

This is incorrect: it should be <docidentifier type="URN">urn:iso:std:iso:123:stage-90.93:ed-3:en</docidentifier>, corresponding to

      <edition>3</edition>
      <language>en</language>
      <language>fr</language>
...

      <status>
        <stage>90</stage>
        <substage>93</substage>
      </status>

This is breaking the rspec of metanorma-standoc and metanorma-iso.

opoudjis commented 2 years ago

THIS IS AN URGENT BUG WHICH IS IMPACTING PRODUCTION!!!

ronaldtse commented 2 years ago

@opoudjis is there some inconsistency here? The original URN was for an "undated reference", the desired URN indicated is a "dated reference".

ronaldtse commented 2 years ago

In RFC 5141, it says:

   docidentifier = originator [":" type] ":" docnumber [":" partnumber]
                   [[":" status] ":" edition]
                   [":" docversion] [":" language]

This means the "status" and "edition" are both optional. In an undated reference, we do not know the "edition", so both elements can be empty. i.e.

andrew2net commented 2 years ago

@opoudjis I've updated status and added edition in v 1.12.1 but the languages are not correct in realton-iso yet. @mico We have list of languages in the Relaton model. Is it possible to generate URN with multiple languages? Like urn:iso:std:iso:123:stage-90.93:ed-3:en,fr.

ronaldtse commented 2 years ago

Is it possible to generate URN with multiple languages? Like urn:iso:std:iso:123:stage-90.93:ed-3:en,fr.

Yes. It is described in RFC 5141:

   language      = monolingual / bilingual / trilingual

   monolingual   = "en" / "fr" / "ru" / "es" / "ar"

   bilingual     = "en,fr" / "en,ru" / "fr,ru"

   trilingual    = "en,fr,ru"
andrew2net commented 2 years ago

Yes. It is described in RFC 5141:

@ronaldtse I see but the question is: does the Pubid::Iso support array of languages ["en", "fr"] or multiple languages should be represented as a string "en,fr"?

andrew2net commented 2 years ago

stages are correct in URN's now