metanorma / pubid-iso

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

Implement accurate numeric stage codes to abbreviations conversion #114

Closed mico closed 2 years ago

mico commented 2 years ago

Now "20.60" returns "AWI" instead of "WD" "10.99" returns "NP" instead of "AWI"

https://github.com/metanorma/pubid-iso/issues/48#issuecomment-1209330306

International harmonized stage code Development stage
00.00, 00.20, 00.60, 00.98, 00.99 :pwi
10.00, 10.20, 10.60, 10.92, 10.98 :np
10.99 :awi
20.00 :awi
20.20, 20.60, 20.98, 20.99 :wd
30.00, 30.20, 30.60, 30.92, 30.98, 30.99 :cd
40.00, 40.20, 40.60, 40.92, 40.93, 40.98, 40.99 :dis
50.00, 50.20, 50.60, 50.92, 50.98, 50.99 :fdis (default) or :prf
60.00 :prf
60.60 :published
90.20, 90.60, 90.92, 90.93, 90.99 :published
95.20, 95.60, 95.92, 95.99 :published

NOTE: In ISO, the only conflicting stage code is 50.00 to 50.99.

  1. We need to implement a class called HarmonizedStageCode, it is composed of stage_code: NN, substage_code: MM.
  2. In Pubid::Iso, we need to have a class DevelopmentStage that contains a HarmonizedStageCode and the development stage (e.g. :pwi, :np ...)
  3. The rendering of the DevelopmentStage in the output differs per document type.

Originally posted by @ronaldtse in https://github.com/metanorma/pubid-iso/issues/48#issuecomment-1234970429