relaton / relaton-iso

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

Failure to parse "ISO/NWIP 19144-1" #124

Closed ronaldtse closed 10 months ago

ronaldtse commented 2 years ago

The identifier is:

ISO/NWIP 19144-4

Which technically should have been:

ISO/NP 19144-4

Loading the former presents this error:

[relaton] ERROR: ISO/NWIP 19144-4 -- Failed to match sequence (stage:'Fpr'? 'WD/'? (type:GUIDE_PREFIX SPACE)? (stage:STAGE SPACE)? ORIGINATOR (SPACE / '/') (TC_DOCUMENT_BODY / STD_DOCUMENT_BODY)) at line 1 char 5.
cause: Failed to match sequence (stage:'Fpr'? 'WD/'? (type:GUIDE_PREFIX SPACE)? (stage:STAGE SPACE)? ORIGINATOR (SPACE / '/') (TC_DOCUMENT_BODY / STD_DOCUMENT_BODY)) at line 1 char 5.
`- Expected one of [TC_DOCUMENT_BODY, STD_DOCUMENT_BODY] at line 1 char 5.
   |- Failed to match sequence ((tctype:TCTYPE '/'?){0, } SPACE tcnumber:DIGITS ('/' ((sctype:SCTYPE SPACE scnumber:DIGITS '/')? wgtype:WGTYPE SPACE wgnumber:DIGITS / sctype:SCTYPE (SPACE / '/' wgtype:WGTYPE SPACE) scnumber:DIGITS))? ' N' SPACE? number:DIGITS) at line 1 char 5.
   |  `- Expected " ", but got "N" at line 1 char 5.
   `- Failed to match sequence ((TYPE / stage:STAGE)? SPACE? ((stage:STAGE / TYPE) SPACE)? number:DIGITS ('|' joint_document:('IDF' SPACE DIGITS))? PART? ITERATION? (SPACE? ':' YEAR)? (AMENDMENT CORRIGENDUM? / CORRIGENDUM)? EDITION? LANGUAGE?) at line 1 char 5.
      `- Expected at least 1 of \\d at line 1 char 5.
         `- Failed to match \\d at line 1 char 5.

This is probably a pubid-iso issue. When receiving "ISO/NWIP xxx" it should normalise to "ISO/NP xxx".

andrew2net commented 2 years ago

@ronaldtse

  1. The error is raised by the pubid-iso gem. It's unable to parse the ISO/NWIP 19144-4 identifier.
  2. The https://www.iso.org/search.html?q=19144-4 doesn't find anything with 19144-4 in identifier.
ronaldtse commented 2 years ago

The error is raised by the pubid-iso gem. It's unable to parse the ISO/NWIP 19144-4 identifier.

That is a failure. Please file the ticket there.

The https://www.iso.org/search.html?q=19144-4 doesn't find anything with 19144-4 in identifier.

Because NP stage projects are not shown on ISO's website.

ronaldtse commented 2 years ago

I have posted to pubid-iso for @mico

ronaldtse commented 10 months ago
[relaton-iso] (ISO/NP 19144-4) Fetching from iso.org ...
[relaton-iso] (ISO/NP 19144-4) Not found.
[relaton-iso] (ISO/NP 19144-4) TIP: If it cannot be found, the document may no longer be published in parts.

Fixed.