metanorma / pubid

PubID gem
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

Improve registry approach #9

Closed ronaldtse closed 3 months ago

ronaldtse commented 4 months ago

Can we use some sort of textual switch for each pubid flavor to register themselves?

e.g.

Then it's much easier to find the correct flavor.

Originally posted by @ronaldtse in https://github.com/metanorma/pubid/issues/6#issuecomment-1991481370

mico commented 3 months ago

@ronaldtse There are exceptions for ISO where identifier doesn't start with "ISO", some examples:

Same with IEC (just few examples):

For IEEE:

For NIST it's always "NBS" or "NIST". If we don't need to take care of these exceptions, I think it's fine to find matching gem just by prefix, but we also can go through pubid-iso/iec/ieee in case if match was not found or parsing was failed.