Add SPARQL syntax sections on triple terms, reifiers, and annotations - #400
Add SPARQL syntax sections on triple terms, reifiers, and annotations#400rubensworks wants to merge 10 commits into
Conversation
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
|
The commit b31c2ce has changed every line in the document from NL to CRNL. (The diff is 26k lines - the doc itself is 13k lines long.) |
afs
left a comment
There was a problem hiding this comment.
Sorry about commenting on a commit but "File Changes" isn't showing PR diffs due to the size.
|
|
||
| <section id="syntaxAnnotation"> | ||
| <h3>Annotation Syntax</h3> | ||
| <p>SPARQL also defines an <dfn data-lt="annotation-syntax">annotation syntax</dfn> |
There was a problem hiding this comment.
This is a <dfn> in this document - it's a pattern.
Turtle defines "annotation-syntax" - it's data.
Maybe this could be "annotation pattern syntax" or we accept that triple/triplepattern is often a bit losoe and use "annotation syntax" with a definition.
Prior to this PR the only use of "annotation syntax" is in a grammar note (link to the syntax production) and the changes.
- A reifier or annotation syntax is only permitted after a triple when the property position is a simple path (an IRI, the keyword a, or a variable), and not for other path expressions.
There was a problem hiding this comment.
Since these definitions are in the scope of the spec they are defined in (?), it might be ok to have a separate Turtle Annotation Syntax and SPARQL Annotation Syntax.
Annotation Pattern Syntax feels a bit clunky, but I don't have a strong opinion on this.
b31c2ce to
8950c95
Compare
Holy carp... Sorry, all, as with similar previous occurrences, I have no idea what I can do differently to prevent such weirdness. I certainly didn't do it on purpose!
Thanks for the cleanup! I'm glad it was a small indended change, which was entirely reviewable by hiding whitespace changes. |
0b0fad6 to
b48e12d
Compare
| </section> | ||
| <section id="syntaxReifyingTriples"> | ||
| <h3>Reifying Triples</h3> | ||
| <p><a data-cite="RDF12-CONCEPTS#dfn-triple-term">Triple terms</a> are mostly used |
There was a problem hiding this comment.
| <p><a data-cite="RDF12-CONCEPTS#dfn-triple-term">Triple terms</a> are mostly used | |
| <p><a data-cite="RDF12-CONCEPTS#dfn-triple-term">Triple terms</a> are used |
In the case of rdf:reifies, it is the object position.
| << ?person :jobTitle "Designer" >> :accordingTo ?authority . | ||
| } | ||
| </pre> | ||
| <p>The example below matches reifying triples with an explicit reifier.</p> |
There was a problem hiding this comment.
| <p>The example below matches reifying triples with an explicit reifier.</p> | |
| <p>The example below matches reifying triples with a | |
| variable to match the reifier.</p> |
| <br/>`<< ?subject1 :predicate1 << :subject2 :predicate2 :object2 >> ~ :IRIREF1 >>`<br/> | ||
| or <br/>`<< :subject4 :predicate4 << :subject3 :predicate3 ?object3 ~ :IRIREF3 >> >>`. | ||
| </p> | ||
| <p>The example below matches reifying triples with an implicit reifier.</p> |
There was a problem hiding this comment.
| <p>The example below matches reifying triples with an implicit reifier.</p> | |
| <p>The example below matches reifying triples without regard to the reifier.</p> |
The data does have a reifier - the query does not capture it in a variable.
|
A few minor improvements suggested but good to go. |
The text and structure of these new sections are mostly based on the text in the Turtle 1.2 spec, with the necessary changes to the interpretation, grammar, and examples.
Closes #176
Closes #398
One discussion point I want to raise here (which I did not incorporate yet into this PR), is the following:
Similar to how a "Triple Term" is a "Triple" that can be placed in the object position, do we need a concept "Triple Term Pattern" to refer to a "Triple Pattern" that can be placed in the object position? IMO, the text in this PR works without such a concept, but perhaps someone else has a different view on it. If we do this, we may also have to do this for Reifying Triple (Patterns). We may also consider grammar renames for this.
Preview | Diff