Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 18 additions & 11 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7926,7 +7926,6 @@ <h5>TZ</h5>
</section>
</section>

<!-- QT -->
<section id="func-triple-terms">
<h4>Functions on Triple Terms</h4>
<section id="func-triple">
Expand Down Expand Up @@ -7956,17 +7955,26 @@ <h5>TRIPLE</h5>
the function returns a triple term with these three elements.
Otherwise, the function raises an error.
</p>

<p>
As a shorthand notation, the <code>TRIPLE</code> function
can also be written in the form of a
<a href="#rExprTripleTerm">triple term expression</a>
using <code>&lt;&lt;(</code> and <code>)&gt;&gt;</code>. There is a
syntax limitation to this shorthand form: the three elements of
the triple term expression can only be variables and directly
written RDF terms, not arbitrary expressions.
In contrast, the function form, <code>TRIPLE</code>,
can be used with arbitrary expressions.
using <code>&lt;&lt;(</code> and <code>)&gt;&gt;</code>. There are
syntax limitations to this shorthand form:
</p>
<ul>
<li>each of the three elements of the triple term expression can only be
a <a href="#defn_QueryVariable">variable</a>
or a directly written [=RDF term=], not an arbitrary expression.
</li>
<li>
the syntax of the subject and predicate positions is limited to an
<a data-cite="RDF12-CONCEPTS#dfn-iri">IRI</a> or a
<a href="#defn_QueryVariable">variable</a>.
</li>
</ul>
<p>
The function form, <code>TRIPLE</code>, can be used with arbitrary expressions.
</p>
<pre class="query nohighlight">
VERSION "1.2"
Expand Down Expand Up @@ -8051,7 +8059,6 @@ <h5>isTRIPLE</h5>
</p>
</section>
</section>
<!-- QT -->

<section id="func-hash">
<h4>Hash Functions</h4>
Expand Down Expand Up @@ -12109,7 +12116,7 @@ <h3>Grammar</h3>
<td><code>[123]&nbsp;&nbsp;</code></td>
<td><code><span class="doc-ref" id="rTripleTermDataSubject">TripleTermDataSubject</span></code></td>
<td>&nbsp;&nbsp;::=&nbsp;&nbsp;</td>
<td><code class="gRuleBody"><a href="#riri">iri</a> | <a href="#rRDFLiteral">RDFLiteral</a> | <a href="#rNumericLiteral">NumericLiteral</a> | <a href="#rBooleanLiteral">BooleanLiteral</a> | <a href="#rTripleTermData">TripleTermData</a></code></td>
<td><code class="gRuleBody"><a href="#riri">iri</a></code></td>
</tr>

<tr style="vertical-align: baseline">
Expand Down Expand Up @@ -12214,7 +12221,7 @@ <h3>Grammar</h3>
<td><code>[138]&nbsp;&nbsp;</code></td>
<td><code><span class="doc-ref" id="rExprTripleTermSubject">ExprTripleTermSubject</span></code></td>
<td>&nbsp;&nbsp;::=&nbsp;&nbsp;</td>
<td><code class="gRuleBody"><a href="#riri">iri</a> | <a href="#rRDFLiteral">RDFLiteral</a> | <a href="#rNumericLiteral">NumericLiteral</a> | <a href="#rBooleanLiteral">BooleanLiteral</a> | <a href="#rVar">Var</a> | <a href="#rExprTripleTerm">ExprTripleTerm</a></code></td>
<td><code class="gRuleBody"><a href="#riri">iri</a> | <a href="#rVar">Var</a></code></td>
</tr>

<tr style="vertical-align: baseline">
Expand Down
4 changes: 2 additions & 2 deletions spec/sparql.bnf
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ TripleTerm ::= '<<(' TripleTermSubject Verb TripleTermObject ')>>
TripleTermSubject ::= Var | iri | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | TripleTerm
TripleTermObject ::= Var | iri | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | TripleTerm
TripleTermData ::= '<<(' TripleTermDataSubject ( iri | 'a' ) TripleTermDataObject ')>>'
TripleTermDataSubject ::= iri | RDFLiteral | NumericLiteral | BooleanLiteral | TripleTermData
TripleTermDataSubject ::= iri
TripleTermDataObject ::= iri | RDFLiteral | NumericLiteral | BooleanLiteral | TripleTermData
VarOrIri ::= Var | iri
Var ::= VAR1 | VAR2
Expand All @@ -138,7 +138,7 @@ UnaryExpression ::= '!' UnaryExpression
| PrimaryExpression
PrimaryExpression ::= BrackettedExpression | BuiltInCall | iriOrFunction | RDFLiteral | NumericLiteral | BooleanLiteral | Var | ExprTripleTerm
ExprTripleTerm ::= '<<(' ExprTripleTermSubject Verb ExprTripleTermObject ')>>'
ExprTripleTermSubject ::= iri | RDFLiteral | NumericLiteral | BooleanLiteral | Var | ExprTripleTerm
ExprTripleTermSubject ::= iri | Var
ExprTripleTermObject ::= iri | RDFLiteral | NumericLiteral | BooleanLiteral | Var | ExprTripleTerm
BrackettedExpression ::= '(' Expression ')'
BuiltInCall ::= Aggregate
Expand Down
Loading