Closed ronaldtse closed 2 years ago
Indeed the original issue is gone but integration with pubid-iso is to be done (some more work may be necessary). Let's keep this one for integrating pubid-iso.
@ronaldtse this is the pubid-iso
's or pubid-core
's issue
relaton fetch 'ISO 6709:2008/Cor. 1:2009'
/Users/andrej/.rvm/gems/ruby-3.0.0/gems/pubid-core-0.2.2/lib/pubid/core/identifier.rb:93:in `rescue in parse': Failed to match sequence (stage:'Fpr'? 'WD/'? (type:GUIDE_PREFIX SPACE)? (stage:STAGE SPACE)? ORIGINATOR (SPACE / '/') (TC_DOCUMENT_BODY / STD_DOCUMENT_BODY / DIR_DOCUMENT_BODY (' + ' joint_document:(ORIGINATOR SPACE DIR_DOCUMENT_BODY))?)) at line 1 char 5. (Pubid::Core::Errors::ParseError)
cause: Failed to match sequence (stage:'Fpr'? 'WD/'? (type:GUIDE_PREFIX SPACE)? (stage:STAGE SPACE)? ORIGINATOR (SPACE / '/') (TC_DOCUMENT_BODY / STD_DOCUMENT_BODY / DIR_DOCUMENT_BODY (' + ' joint_document:(ORIGINATOR SPACE DIR_DOCUMENT_BODY))?)) at line 1 char 5.
`- Expected one of [TC_DOCUMENT_BODY, STD_DOCUMENT_BODY, DIR_DOCUMENT_BODY (' + ' joint_document:(ORIGINATOR SPACE DIR_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))? SPACE 'N' SPACE? number:DIGITS) at line 1 char 5.
| `- Expected " ", but got "6" 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 14.
| `- Extra input after last repetition at line 1 char 14.
| `- Failed to match sequence ('(' language:(([a-z]{1, } ','? / ('E' / 'F' / 'A' / 'R') '/'?){0, }) ')') at line 1 char 14.
| `- Expected "(", but got "/" at line 1 char 14.
`- Failed to match sequence (DIR_DOCUMENT_BODY (' + ' joint_document:(ORIGINATOR SPACE DIR_DOCUMENT_BODY))?) at line 1 char 14.
`- Extra input after last repetition at line 1 char 14.
`- Failed to match sequence (' + ' joint_document:(ORIGINATOR SPACE DIR_DOCUMENT_BODY)) at line 1 char 14.
`- Expected " + ", but got "/Co" at line 1 char 14.
@ronaldtse this is the
pubid-iso
's orpubid-core
's issuerelaton fetch 'ISO 6709:2008/Cor. 1:2009' /Users/andrej/.rvm/gems/ruby-3.0.0/gems/pubid-core-0.2.2/lib/pubid/core/identifier.rb:93:in `rescue in parse': Failed to match sequence (stage:'Fpr'? 'WD/'? (type:GUIDE_PREFIX SPACE)? (stage:STAGE SPACE)? ORIGINATOR (SPACE / '/') (TC_DOCUMENT_BODY / STD_DOCUMENT_BODY / DIR_DOCUMENT_BODY (' + ' joint_document:(ORIGINATOR SPACE DIR_DOCUMENT_BODY))?)) at line 1 char 5. (Pubid::Core::Errors::ParseError) cause: Failed to match sequence (stage:'Fpr'? 'WD/'? (type:GUIDE_PREFIX SPACE)? (stage:STAGE SPACE)? ORIGINATOR (SPACE / '/') (TC_DOCUMENT_BODY / STD_DOCUMENT_BODY / DIR_DOCUMENT_BODY (' + ' joint_document:(ORIGINATOR SPACE DIR_DOCUMENT_BODY))?)) at line 1 char 5. `- Expected one of [TC_DOCUMENT_BODY, STD_DOCUMENT_BODY, DIR_DOCUMENT_BODY (' + ' joint_document:(ORIGINATOR SPACE DIR_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))? SPACE 'N' SPACE? number:DIGITS) at line 1 char 5. | `- Expected " ", but got "6" 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 14. | `- Extra input after last repetition at line 1 char 14. | `- Failed to match sequence ('(' language:(([a-z]{1, } ','? / ('E' / 'F' / 'A' / 'R') '/'?){0, }) ')') at line 1 char 14. | `- Expected "(", but got "/" at line 1 char 14. `- Failed to match sequence (DIR_DOCUMENT_BODY (' + ' joint_document:(ORIGINATOR SPACE DIR_DOCUMENT_BODY))?) at line 1 char 14. `- Extra input after last repetition at line 1 char 14. `- Failed to match sequence (' + ' joint_document:(ORIGINATOR SPACE DIR_DOCUMENT_BODY)) at line 1 char 14. `- Expected " + ", but got "/Co" at line 1 char 14.
@andrew2net can you file this in pubid-iso
? I will file the issue this time but let's keep concerns separate.
@andrew2net this is fixed in https://github.com/metanorma/pubid-iso/pull/65 .
In https://github.com/metanorma/iso-6709/issues/7, the identifier
ISO 6709:2008/Cor. 1:2009
was used but was not accepted by Relaton ISO.This is because the now correct identifier does not have the full stop after
Cor
. However, this is an old style reference, and is accepted by the pubid-iso gem.We should use integrate Relaton-ISO with the pubid-iso gem to normalize the input, and output PubID-ISO identifiers (as objects, not strings).