Skip to content

Add SPARQL syntax sections on triple terms, reifiers, and annotations#400

Open
rubensworks wants to merge 3 commits into
mainfrom
feature/syntax-tripleterms-reifiers
Open

Add SPARQL syntax sections on triple terms, reifiers, and annotations#400
rubensworks wants to merge 3 commits into
mainfrom
feature/syntax-tripleterms-reifiers

Conversation

@rubensworks

@rubensworks rubensworks commented Jun 24, 2026

Copy link
Copy Markdown
Member

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

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
@rubensworks rubensworks requested review from Tpt, afs, hartig and kasei June 24, 2026 09:30
Comment thread spec/index.html Outdated
Comment thread spec/index.html Outdated
Comment thread spec/index.html Outdated
Comment thread spec/index.html Outdated
Comment thread spec/index.html Outdated
Comment thread spec/index.html Outdated
Comment thread spec/index.html Outdated
Comment thread spec/index.html Outdated
Comment thread spec/index.html Outdated
Comment thread spec/index.html Outdated
Comment thread spec/index.html Outdated
Comment thread spec/index.html Outdated
Comment thread spec/index.html Outdated
Comment thread spec/index.html Outdated
Comment thread spec/index.html Outdated
Comment thread spec/index.html Outdated
Comment thread spec/index.html Outdated
Comment thread spec/index.html Outdated
Comment thread spec/index.html Outdated
<section id="syntaxAnnotation">
<h3>Annotation Syntax</h3>
<p>SPARQL also defines an <dfn data-lt="annotation-syntax">annotation syntax</dfn>
to both reify and assert a <a href="#defn_TriplePattern">triple pattern</a>,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are patterns "reified" or "asserted"? I think it's more natural to think of annotation syntax as representing patterns which match reified and asserted data.

Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Comment thread spec/index.html
Comment on lines +1493 to +1494
<p>SPARQL also defines an <dfn data-lt="annotation-syntax">annotation syntax</dfn>
that both reifies and asserts a <a href="#defn_TriplePattern">triple pattern</a>,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are patterns "reified" or "asserted"? I think it's more natural to think of annotation syntax as representing patterns which match reified and asserted data.

@kasei Good point. What do you think of the following?

Suggested change
<p>SPARQL also defines an <dfn data-lt="annotation-syntax">annotation syntax</dfn>
that both reifies and asserts a <a href="#defn_TriplePattern">triple pattern</a>,
<p>SPARQL also defines an <dfn data-lt="annotation-syntax">annotation syntax</dfn>
to represent <a href="#defn_TriplePattern">triple patterns</a> that match reified and asserted triples,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this obscures the point of this sentence, that SPARQL's annotation syntax simultaneously reifies and asserts. Trying to fix that, starting with the edit above --

Suggested change
<p>SPARQL also defines an <dfn data-lt="annotation-syntax">annotation syntax</dfn>
that both reifies and asserts a <a href="#defn_TriplePattern">triple pattern</a>,
<p>SPARQL also defines an <dfn data-lt="annotation-syntax">annotation syntax</dfn>
to represent <a href="#defn_TriplePattern">triple patterns</a> that simultaneously
match reified and asserted triples,

Comment thread spec/index.html
Comment on lines +1375 to +1376
we can use a <a data-cite="RDF12-CONCEPTS#dfn-triple-term">triple term</a>
or another <a href="#defn_TriplePattern">triple pattern</a>.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got a bit confused by this sentence because it puts at the same level a RDF term and the pattern for a triple that is not a term.

What about something like

Suggested change
we can use a <a data-cite="RDF12-CONCEPTS#dfn-triple-term">triple term</a>
or another <a href="#defn_TriplePattern">triple pattern</a>.
we can use a triple term pattern.

and then define what this "triple term pattern" is.

Also, imho no need to mention plain "triple term"s, they can be seen as a special case of triple term patterns.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Special cases" are easily glossed over or misunderstood by new readers. Therefore, to my mind, such "special cases" should almost always be explicitly stated, if they're intended to be understood by such new readers. So, if we accept the edit above, and then 'define what this "triple term pattern" is', that definition should include explicit mention of the special case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a subsection about annotations, reified triples and triple terms Explain meaning of Reifier

5 participants