Closed hartig closed 3 years ago
Open TODOs in this PR:
There is one simplification that can be done. Rather than the ObjectList
rules, and use the annotation production twice, it can go on Object...
ObjectPath ::= GraphNode AnnotationPatternPath?
Object ::= GraphNode AnnotationPattern?
which is mention once.
(Note that Collection
uses GraphNode
etc ).
- adding the text note saying "If annotation, must be simple path"
- perhaps another note to highlight that property path patterns can be used within the annotation part
To go with this, I've raised #107 to add tests to the SPARQL-star syntax test suite.
Great idea Andy! I have implemented these simplifications now.
I have addressed the remaining two TODOs now. The new parts are the additional paragraphs below the actual grammar in Section 4.2. Additionally, I have extended the example for the corresponding expansion rule in Section 4.3.2 (to highlight once more the possibility of having path expressions inside the annotation patterns).
@afs can you please take a look.
Text looks good. I don't think it really needs to say as much about expanding prefixed name and triple forms, much too diligent! (bullets 2 and 3 in 4.3.2). But the text is there so it can stay.
There are 3 syntax forms (some with variations) that have been discussed. While there has been some advocacy from a few people, there does not seem to be a leading candidate in the community as a whole.
We have
:s :p :o @{ :p :z } .
{ }
not in Turtle{ }
is about triples, not a predicate-object-list"literal"@
is a language tag.:s :p :o @[ :p :z ] .
[ ]
is suggestive of blank nodes. "literal"@
is a language tag.:s :p :o {| :p :z |} .
{
is a graph in TriGI'm pretty used to {| ... |}
now and definitely favor a symmetric beginning/ending such as this. That combination of characters is unlikely to be confused with anything else, as long as the token {|
is examined before {
, which is similar to other sequences where a pair of characters takes precedence over a single character (e.g., : <=
vs <
, !=
vs !
in SPARQL).
Based on the agreement in the telco today, I am merging this PR now.
This PR is meant to address the SPARQL-star part of #9. That is, It adds the extension of the SPARQL-star grammar with the annotation syntax.
(the changes in this PR are copied over from #65 which was based on the old organization of files in the repo)
Preview | Diff