metanorma / pubid-iso

Implementation of ISO pubid
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

Fails to parse ISO/DATA docs #241

Closed andrew2net closed 7 months ago

andrew2net commented 8 months ago

There are a few ISO/DATA docs like ISO/DATA 3:1977 which this gem fails to parse:

> Pubid::Iso::Identifier.parse 'ISO/DATA 3:1977'
/Users/andrej/.rvm/gems/ruby-3.2.0/gems/pubid-core-1.8.7/lib/pubid/core/identifier.rb:33:in `resolve_identifier': cannot parse type DATA (Pubid::Core::Errors::ParseTypeError)
    from /Users/andrej/.rvm/gems/ruby-3.2.0/gems/pubid-core-1.8.7/lib/pubid/core/identifier.rb:9:in `create'
    from /Users/andrej/.rvm/gems/ruby-3.2.0/gems/pubid-iso-0.6.1/lib/pubid/iso/identifier/base.rb:141:in `transform'
    from /Users/andrej/.rvm/gems/ruby-3.2.0/gems/pubid-core-1.8.7/lib/pubid/core/identifier/base.rb:139:in `parse'
    from /Users/andrej/.rvm/gems/ruby-3.2.0/gems/pubid-iso-0.6.1/lib/pubid/iso/identifier.rb:7:in `parse'
    from (irb):2:in `<main>'
    from /Users/andrej/.rvm/gems/ruby-3.2.0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
    from /Users/andrej/.rvm/gems/ruby-3.2.0/bin/irb:25:in `load'
    from /Users/andrej/.rvm/gems/ruby-3.2.0/bin/irb:25:in `<main>'
    from /Users/andrej/.rvm/gems/ruby-3.2.0/bin/ruby_executable_hooks:22:in `eval'
    from /Users/andrej/.rvm/gems/ruby-3.2.0/bin/ruby_executable_hooks:22:in `<main>'
ronaldtse commented 8 months ago

@mico can you please help handle this ASAP? @andrew2net is waiting. Thanks!

mico commented 8 months ago

@ronaldtse @andrew2net I cannot find any information or other identifiers for "DATA" type. I need full name of "DATA" type for class naming.

andrew2net commented 8 months ago

@mico I don't know what the "DATA" means. @ronaldtse can you explain?

ronaldtse commented 7 months ago

@mico Let's just call the "DATA" document type "Data".

Here's an example of the data previously published as "ISO DATA 1":

Screenshot 2024-01-15 at 9 16 13 PM

So I think just calling it "Data" (full name) is fine.