-
Notifications
You must be signed in to change notification settings - Fork 4
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
Order of Prefix Declarations #59
Comments
I agree it isn't as clear as it might be. The grammar rules for triples work on IRIs,not prefixed names. e.g.
so any prefixed name must have been translated for the rule to match. A prefixed name does not match the "subject" rule. The section Parser State defines how the map is maintained.
Combined with
the prefix declaration must be before its use. How might the text be improved? |
The IRI production refers to prefixed names, so subject would match:
The parser state part is, independent of the above, not clear about order, it states
But it should be clarified that "Outside" refers to "Last prefixID before the PNAME_NS". |
The namespaces map is in the Parser State so it seems implicit to me that the state is updated during processing. The seen by a Term Constructor such as I think what is missing is a similar requirement in The whole point of the Parsing section is to consider how the grammar is parsed to result in an RDF Graph, so state is key to this. There are, of course, other state variables that need to be evaluated in order as well. Other than updating Note that the test suite has some tests that specifically look for order of prefixes, although there may not be that check for the absence of a prefix causing an error. |
As far as I can tell, the normative part does not sufficiently specify how the order of prefix declaration interacts with the triples that use the prefix, in particular what if a prefix is declared after its first use. For example:
The TTL parsers I tested (rapper, OWL-API) reject the above, but I see nothing in the normative part that forbids it: It is certainly defined by grammar and the part about parser state (7.1) does not specify order for the namespaces, only that "Outside of a prefixID production" a declared prefix will be replaced (not "After"). I think this should be clarified explicitly, Example 9 also does not cover this case.
The text was updated successfully, but these errors were encountered: