Skip to content

Commit e31d0db

Browse files
authored
Merge branch 'main' into grammar-reifiers
2 parents 5a13841 + d879cf4 commit e31d0db

File tree

1 file changed

+36
-31
lines changed

1 file changed

+36
-31
lines changed

spec/index.html

Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7406,107 +7406,112 @@ <h5>TZ</h5>
74067406
</section>
74077407

74087408
<!-- QT -->
7409-
<section id="func-quoted-triples">
7410-
<h4>Functions on Quoted Triples</h4>
7409+
<section id="func-triple-terms">
7410+
<h4>Functions on Triple Terms</h4>
74117411
<section id="func-triple">
74127412
<h5>TRIPLE</h5>
74137413
<pre class="prototype nohighlight">
7414-
<span class="return">quoted triple</span> <span class="operator">TRIPLE</span> (<span class="type RDFterm">RDF term</span> <span class="name">subj</span>, <span class="type RDFterm">RDF term</span> <span class="name">pred</span>, <span class="type RDFterm">RDF term</span> <span
7414+
<span class="return">triple term</span> <span class="operator">TRIPLE</span> (<span class="type RDFterm">RDF term</span> <span class="name">subj</span>, <span class="type RDFterm">RDF term</span> <span class="name">pred</span>, <span class="type RDFterm">RDF term</span> <span
74157415
class="name">obj</span>)
74167416
</pre>
74177417
<pre class="query nohighlight">
7418-
<span class="operator">&lt;&lt;</span> subj pred obj <span class="operator">&gt;&gt;</span>
7418+
<span class="operator">&lt;&lt;(</span> subj pred obj <span class="operator">)&gt;&gt;</span>
74197419
</pre>
74207420
<p>
74217421
If the 3-tuple (<code style="color:black">subj</code>,
74227422
<code style="color:black">pred</code>,
74237423
<code style="color:black">obj</code>)
74247424
is an <a data-cite="RDF12-CONCEPTS#dfn-rdf-triple">RDF triple</a>
74257425
(that is, <code style="color:black">subj</code> is an
7426-
<a data-cite="RDF12-CONCEPTS#dfn-iri">IRI</a>,
7427-
<a data-cite="RDF12-CONCEPTS#dfn-quoted-triple">quoted triple</a> or
7426+
<a data-cite="RDF12-CONCEPTS#dfn-iri">IRI</a> or
74287427
<a data-cite="RDF12-CONCEPTS#dfn-blank-node">blank node</a>;
74297428
<code style="color:black">pred</code> is an
74307429
<a data-cite="RDF12-CONCEPTS#dfn-iri">IRI</a>;
74317430
and <code style="color:black">obj</code> is an
74327431
<a data-cite="RDF12-CONCEPTS#dfn-iri">IRI</a>,
7433-
<a data-cite="RDF12-CONCEPTS#dfn-quoted-triple">quoted triple</a>,
7432+
<a data-cite="RDF12-CONCEPTS#dfn-triple-term">triple term</a>,
74347433
<a data-cite="RDF12-CONCEPTS#dfn-blank-node">blank node</a> or
74357434
<a data-cite="RDF12-CONCEPTS#dfn-literal">literal</a>)
7436-
the function returns a quoted triple with these three elements.
7435+
the function returns a triple term with these three elements.
74377436
Otherwise, the function raises an error.
74387437
</p>
74397438

74407439
<p>
74417440
As a shorthand notation, the <code>TRIPLE</code> function
74427441
can also be written in the form of a
7443-
<a href="#rExprQuotedTriple">quoted triple expression</a>
7444-
using <code>&lt;&lt;</code> and <code>&gt;&gt;</code>. There is a
7442+
<a href="#rExprTripleTerm">triple term expression</a>
7443+
using <code>&lt;&lt;(</code> and <code>)&gt;&gt;</code>. There is a
74457444
syntax limitation to this shorthand form: the three elements of
7446-
the quoted triple expression can only be variables and directly
7445+
the triple term expression can only be variables and directly
74477446
written RDF terms, not arbitrary expressions.
74487447
In contrast, the function form, <code>TRIPLE</code>,
74497448
can be used with arbitrary expressions.
74507449
</p>
74517450
<pre class="query nohighlight">
74527451
PREFIX : &lt;http://example/&gt;
7452+
PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
7453+
74537454
SELECT ?s ?date {
7454-
?s ?p ?o
7455-
BIND( &lt;&lt; ?s ?p ?o &gt;&gt; AS ?qt )
7456-
?qt :tripleAdded ?date
7455+
?s ?p ?o .
7456+
BIND( &lt;&lt;( ?s ?p ?o )&gt;&gt; AS ?tt )
7457+
:myreifier rdf:reifies ?tt .
7458+
:myreifier :tripleAdded ?date .
74577459
}
74587460
</pre>
74597461
<pre class="query nohighlight">
74607462
PREFIX : &lt;http://example/&gt;
7463+
PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
7464+
74617465
SELECT ?s ?date {
7462-
?s ?p ?o
7463-
BIND( TRIPLE(?s, ?p, ?o) AS ?qt )
7464-
?qt :tripleAdded ?date
7466+
?s ?p ?o .
7467+
BIND( TRIPLE(?s, ?p, ?o) AS ?tt )
7468+
:myreifier rdf:reifies ?tt .
7469+
:myreifier :tripleAdded ?date .
74657470
}
74667471
</pre>
74677472
</section>
74687473

74697474
<section id="func-subject">
74707475
<h5>SUBJECT</h5>
7471-
<pre class="prototype nohighlight"><span class="return">RDF term</span> <span class="operator">SUBJECT</span> (<span class="type RDFterm">quoted triple</span> <span class="name">quoted-triple</span>)</pre>
7476+
<pre class="prototype nohighlight"><span class="return">RDF term</span> <span class="operator">SUBJECT</span> (<span class="type RDFterm">triple term</span> <span class="name">triple-term</span>)</pre>
74727477
<p>
74737478
If the argument is a
7474-
<a data-cite="RDF12-CONCEPTS#dfn-quoted-triple">quoted triple</a>,
7479+
<a data-cite="RDF12-CONCEPTS#dfn-triple-term">triple term</a>,
74757480
the function returns the
74767481
<a data-cite="RDF12-CONCEPTS#dfn-subject">subject</a>
7477-
of the quoted triple.
7482+
of the triple term.
74787483
If the argument is not a
7479-
<a data-cite="RDF12-CONCEPTS#dfn-quoted-triple">quoted triple</a>,
7484+
<a data-cite="RDF12-CONCEPTS#dfn-triple-term">triple term</a>,
74807485
an error is raised.
74817486
</p>
74827487
</section>
74837488

74847489
<section id="func-predicate">
74857490
<h5>PREDICATE</h5>
7486-
<pre class="prototype nohighlight"><span class="return">RDF term</span> <span class="operator">PREDICATE</span> (<span class="type RDFterm">quoted triple</span> <span class="name">quoted-triple</span>)</pre>
7491+
<pre class="prototype nohighlight"><span class="return">RDF term</span> <span class="operator">PREDICATE</span> (<span class="type RDFterm">triple term</span> <span class="name">triple-term</span>)</pre>
74877492
<p>
74887493
If the argument is a
7489-
<a data-cite="RDF12-CONCEPTS#dfn-quoted-triple">quoted triple</a>,
7494+
<a data-cite="RDF12-CONCEPTS#dfn-triple-term">triple term</a>,
74907495
the function returns the
74917496
<a data-cite="RDF12-CONCEPTS#dfn-predicate">predicate</a>
7492-
of the quoted triple.
7497+
of the triple term.
74937498
If the argument is not a
7494-
<a data-cite="RDF12-CONCEPTS#dfn-quoted-triple">quoted triple</a>,
7499+
<a data-cite="RDF12-CONCEPTS#dfn-triple-term">triple term</a>,
74957500
an error is raised.
74967501
</p>
74977502
</section>
74987503

74997504
<section id="func-object">
75007505
<h5>OBJECT</h5>
7501-
<pre class="prototype nohighlight"><span class="return">RDF term</span> <span class="operator">OBJECT</span> (<span class="type RDFterm">quoted triple</span> <span class="name">quoted-triple</span>)</pre>
7506+
<pre class="prototype nohighlight"><span class="return">RDF term</span> <span class="operator">OBJECT</span> (<span class="type RDFterm">triple term</span> <span class="name">triple-term</span>)</pre>
75027507
<p>
75037508
If the argument is a
7504-
<a data-cite="RDF12-CONCEPTS#dfn-quoted-triple">quoted triple</a>,
7509+
<a data-cite="RDF12-CONCEPTS#dfn-triple-term">triple term</a>,
75057510
the function returns the
75067511
<a data-cite="RDF12-CONCEPTS#dfn-object">object</a>
7507-
of the quoted triple.
7512+
of the triple term.
75087513
If the argument is not a
7509-
<a data-cite="RDF12-CONCEPTS#dfn-quoted-triple">quoted triple</a>,
7514+
<a data-cite="RDF12-CONCEPTS#dfn-triple-term">triple term</a>,
75107515
an error is raised.
75117516
</p>
75127517
</section>
@@ -7515,7 +7520,7 @@ <h5>OBJECT</h5>
75157520
<h5>isTRIPLE</h5>
75167521
<pre class="prototype nohighlight"><span class="return">xsd:boolean</span> <span class="operator">isTRIPLE</span> (<span class="type RDFterm">RDF term</span> <span class="name">term</span>)</pre>
75177522
<p>
7518-
If the argument is a <a data-cite="RDF12-CONCEPTS#dfn-quoted-triple">quoted triple</a>,
7523+
If the argument is a <a data-cite="RDF12-CONCEPTS#dfn-triple-term">triple term</a>,
75197524
the function returns true.
75207525
If the argument is any other kind of
75217526
<a data-cite="RDF12-CONCEPTS#dfn-rdf-term">RDF term</a>,
@@ -11886,7 +11891,7 @@ <h2>Changes between SPARQL 1.1 Query Language and SPARQL 1.2 Query Language</h2>
1188611891
in <a href="#sparqlGrammar" class="sectionRef"></a></li>
1188711892
<li>Migrate XML Schema references to 1.1</li>
1188811893
<li>Update references to XPath from 2.0 to 3.1</li>
11889-
<li>Add functions on quoted triples to <a href="#func-quoted-triples" class="sectionRef"></a></li>
11894+
<li>Add functions on triple terms to <a href="#func-triple-terms" class="sectionRef"></a></li>
1189011895
</ul>
1189111896
</li>
1189211897
<li>

0 commit comments

Comments
 (0)