metanorma / metanorma-iso

Metanorma processor for ISO standards
BSD 2-Clause "Simplified" License
13 stars 5 forks source link

Broken (more like undefined) PubID for committee document with stage #1195

Open ronaldtse opened 1 month ago

ronaldtse commented 1 month ago

Is this a PubID issue?

Screenshot 2024-07-25 at 10 04 39 PM Screenshot 2024-07-25 at 10 04 29 PM

Because the docstage being 20/20 the PubID is now wrong.

Right now it is shown as:

Technically we have no defined the PubID for N-documents, because usually N-documents are replaced per version.

Taking the pattern of "{publisher}/{stage} {number}", perhaps it should be:

Metadata:

= Validation report for conversion of ISO 10303 parts from PDF form to a model-based form
:docnumber: 11498
:edition: 1
:revdate: 2024-07-17
:copyright-year: 2024
:language: en
:title-intro-en: SMRL Innovation
:title-intro-fr: Innovation de SMRL
:title-main-en: Validation report for conversion of ISO 10303 parts from PDF form to a model-based form
:title-main-fr: Rapport de validation pour la conversion des pièces ISO 10303 d'un formulaire PDF à un formulaire basé sur un modèle
:doctype: committee-document
:docstage: 20
:docsubstage: 20
:secretariat: ANSI
:technical-committee-number: 184
:technical-committee: Industrial Automation Systems and Integration
:subcommittee-number: 4
:subcommittee: Industrial Data
:workgroup-number: 12
:workgroup-type: WG
:workgroup: STEP product modelling and resources

The document is at:

opoudjis commented 1 month ago

The identifier generation for ISO identifiers is completely delegated to pubid, by design. I have no idea how N is even ending up in the identifier. This is for @mico

mico commented 1 month ago

@ronaldtse yes, it's pubid issue. For the reason I don't know I left stage rendering in Technical Committee identifier rendering, but I cannot find anything about stages for TC identifiers anywhere and removing rendering "stages" doesn't make any tests crash.

opoudjis commented 1 month ago

This is being generated with the parameters:

{:number=>"11498", :type=>:tc, :publisher=>"ISO", :stage=>"20.20", :sctype=>"SC", :scnumber=>"4", :tctype=>"TC", :tcnumber=>"184", :wgtype=>"WG", :wgnumber=>"12"}
mico commented 1 month ago

This is being generated with the parameters:

{:number=>"11498", :type=>:tc, :publisher=>"ISO", :stage=>"20.20", :sctype=>"SC", :scnumber=>"4", :tctype=>"TC", :tcnumber=>"184", :wgtype=>"WG", :wgnumber=>"12"}

@opoudjis yes, with this input we get stage in output. @ronaldtse should we ignore the stage and produce output without, or we should add stage to output? (it will be first known TC identifier with stage)

ronaldtse commented 1 month ago

@opoudjis @mico there are 2 types of ISO IDs now:

These two types of IDs need to be handled separately.

ISO N-document IDs do not show stages.

mico commented 1 month ago
  • ISO N-document IDs

@ronaldtse is there other N documents except TC documents? (ISO/TC)

ronaldtse commented 1 month ago

@ronaldtse is there other N documents except TC documents? (ISO/TC)

No. TC documents the "N documents" because they have an "N-number".