owlcollab / oboformat

Automatically exported from code.google.com/p/oboformat
5 stars 2 forks source link

Use SPARQL production rules for prefixed and unprefixed identifiers #150

Open althonos opened 5 months ago

althonos commented 5 months ago

This is a proposal for 1.6 to use the production rules from SPARQL 1.1 to define prefixed identifiers.

Proposed rules:

Prefixed-ID ::= PN_PREFIX ':' PN_LOCAL

The advantage is that SPARQL prefixed identifiers still use backslashes to escape special characters, so I think this will introduce less breakage than requiring CURIE which would mean switching to percent-escaping for special characters.

Then prefix expansion from OBO ID-space can be done the same way as SPARQL expansion, with an added rule to use http://purl.obolibrary.org/obo/<prefix>_<local> for any OBO ID-space not defined in the header.

cmungall commented 5 months ago

This may be stricter than what is used in the wild. See for example

For primary OBO IDs we should be OK

balhoff commented 5 months ago

One problem with the exact SPARQL definition of a prefixed identifier is that this is not valid due to the slash: doi:10.1016/j.ijms.2006.01.054.

althonos commented 5 months ago

In my opinion none of these is a problem, since SPARQL supports escaping for special characters; the advantage over the current spec of OBO is that the escaping is made normative and consistent (whereas OBO has some context-specific escape here and there).