-
Notifications
You must be signed in to change notification settings - Fork 18
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
Rationale for allowing directives throughout an N3 Document #175
Comments
Cases in particular the the spec does not explicitly define the behavior of are if I had the following; whether the last triple in the document should be
Whilst |
@jeswr Good point. We currently mention the following about this:
Behavior is inconsistent between reasoners when remapping the namespace inside a quoted graph: IIRC, this decision was made in the original N3 proposal and was not revised afterwards. |
It is good to have declarations at the top of the file but it is another thing to throw exceptions when that is not the case. |
If this is to remain in the spec (personally I would prefer an error to be thrown) then what do you think the correct behaviour for #175 (comment) would be @josd ? |
The behaviour of Cwm and EYE ;-)
Cwm gives
and EYE gives
|
Also remark that this behaviour is also needed for the namespace prefixes declared in graphs obtained via |
It’s interesting that N3 allows declarations anywhere you can have a statement; Turtle does this too, but does not have graph blocks. TriG only allows them outside of blocks, so anyplace at the top level. Note that declarations are additive, so you can have an In actual use, there’s little reason to have declarations anywhere but at the top of the document; anything else could lead to at least human misinterpretation and doesn’t add any semantic value. |
In that case, I would expect the namespace declaration to only be applicable within the quoted graph, and not beyond it, as in @jeswr 's example. |
@william-vw — Please edit #175 (comment) and wrap each instance of |
@gkellogg — Please edit #175 (comment) and wrap each instance of |
Concatenating files is a common cause of declarations being elsewhere, and seems (based on conversation and thread content; I have no empirical data) to be a fairly common actual use case. |
I was wondering what the rationale for allowing
@prefix
and@base
statements to occur in arbitrary positions throughout an N3 document was.To me it seems quite messy and could create a lot of shadowing of prefixes and bases in different contexts. Why not just require that directives precede all statements?
The text was updated successfully, but these errors were encountered: