Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method to customize document identifiers #22

Open
ronaldtse opened this issue Feb 12, 2020 · 3 comments
Open

Method to customize document identifiers #22

ronaldtse opened this issue Feb 12, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@ronaldtse
Copy link
Contributor

ronaldtse commented Feb 12, 2020

Users who use this gem will want to customize their document identifiers. Let's use the ISO document identifier scheme as an example to adapt for.

The ISO document identifier scheme differs by stage:

Template for unpublished:

  • ISO {stage} {report number}[-{part number}]:{year}

Template for published:

  • ISO {stage} {report number}[-{part number}]:{year}

Examples:

  • ISO CD XXXX–2 (“Committee Draft of ISO XXXX Part 2”);
  • ISO YYYY-3:2020 (“ISO YYYY Part 3, 2020 edition”).

Template for unpublished amendments:

  • ISO {stage} {report number}[-{part number}]:{year}/{“Cor”|“Amd”} {number}:{year}

For example:

  • ISO/IEC 14888-2:2008/Cor 1:2015 (“First correction—issued in 2015—to ISO/IEC 14888 Part 2, 2008 edition”);
  • ISO/IEC 18031:2011/Amd 1:2017 (“First amendment—issued in 2017—to ISO/IEC 18031, 2011 edition”)

We can use a YAML structure to express this.

If it is simple:

docid_scheme: "{orgid} {docnumber}"

If more complex:

docid_scheme:
  - doctype: [ standard, technical-report ]
    stages:
       published: "ISO {report number}[-{part number}]:{year}"
       working-draft: "ISO {stage} {report number}[-{part number}]:{year}"
       committee-draft: "ISO {stage} {report number}[-{part number}]:{year}"
    ...
  - doctype: [ amendment ]
    stages:
      published: "ISO {report number}[-{part number}]:{year}/{“Cor”|“Amd”} {number}:{year}"
      working-draft: "ISO {stage} {report number}[-{part number}]:{year}/{“Cor”|“Amd”} {number}:{year}"
      committee-draft: "ISO {stage} {report number}[-{part number}]:{year}/{“Cor”|“Amd”} {number}:{year}"
    ...

This ticket needs more discussion when it gets tackled. Ping me for details!

@ronaldtse ronaldtse added the enhancement New feature or request label Feb 12, 2020
@opoudjis
Copy link
Contributor

This ticket is an elaboration of #18

@ronaldtse
Copy link
Contributor Author

@opoudjis opoudjis assigned opoudjis and unassigned w00lf Sep 5, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in Metanorma Sep 5, 2023
@opoudjis
Copy link
Contributor

opoudjis commented Sep 5, 2023

This only makes sense if you can identify recurring attributes, preferably populated as document attributes, that can fit into a YAML one-liner. I suspect that in the general case, it will not work; you certainly could never implement ISO identifiers in it.

@opoudjis opoudjis moved this from 🆕 New to 🏕 Med priority in Metanorma Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🏕 Med priority
Development

No branches or pull requests

3 participants