zimeon / ocfl-py

OCFL tools in Python
MIT License
20 stars 7 forks source link

URN Object IDs flagged as validation warning #75

Closed awoods closed 3 years ago

awoods commented 3 years ago

OCFL objects with an id such as: "URN-3:HUL.DRS.OBJECT:100775205", are flagged as validation warnings. I believe these should be valid.. as URNs are valid URIs and the above URN-3 scheme is a valid URN.

See: https://www.iana.org/assignments/urn-informal/urn-3

zimeon commented 3 years ago

The URN-3 scheme requires urn: prefix, so I think your example should be urn:URN-3:HUL.DRS.OBJECT:100775205 per https://www.iana.org/assignments/urn-informal/urn-3

Having said that, the syntax for URI schemes as defined in https://www.rfc-editor.org/rfc/rfc3986.html#section-3.1 is:

scheme      = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )

so URN-3:HUL.DRS.OBJECT:100775205 should be accepted as a URI.