@@ -5281,7 +5281,7 @@ <h3>Operator Mapping</h3>
5281
5281
<td><span class="type RDFterm">RDF term</span></td>
5282
5282
<td><span class="type RDFterm">RDF term</span></td>
5283
5283
<td class="xpathOp">
5284
- <a href="#func-RDFterm-equal " class="SPARQLoperator">RDFterm-equal </a>(A, B)
5284
+ <a href="#func-sameValue " class="SPARQLoperator">sameValue </a>(A, B)
5285
5285
</td>
5286
5286
<td>xsd:boolean</td>
5287
5287
</tr>
@@ -5292,7 +5292,7 @@ <h3>Operator Mapping</h3>
5292
5292
<td><span class="type RDFterm">RDF term</span></td>
5293
5293
<td><span class="type RDFterm">RDF term</span></td>
5294
5294
<td class="xpathOp">
5295
- <a data-cite="XPATH-FUNCTIONS-31#func-not">fn:not</a>(<a href="#func-RDFterm-equal " class="SPARQLoperator">RDFterm-equal </a>(A, B))
5295
+ <a data-cite="XPATH-FUNCTIONS-31#func-not">fn:not</a>(<a href="#func-sameValue " class="SPARQLoperator">sameValue </a>(A, B))
5296
5296
</td>
5297
5297
<td>xsd:boolean</td>
5298
5298
</tr>
@@ -5672,49 +5672,38 @@ <h5>NOT IN</h5>
5672
5672
<h4>Functions on RDF Terms</h4>
5673
5673
5674
5674
<section id="func-sameTerm">
5675
- <h5>sameTerm </h5>
5675
+ <h5>SameTerm </h5>
5676
5676
<pre class="prototype nohighlight"> <span class="return">xsd:boolean</span> <span class="operator">sameTerm</span> (<span class="type"><span class="type RDFterm">RDF term</span></span> <span class="name">term1</span>, <span class="type"><span class="type RDFterm">RDF term</span></span> <span class="name">term2</span>)</pre>
5677
5677
<p>Returns TRUE if <code>term1</code> and <code>term2</code> are the same RDF term as
5678
5678
defined in [[[RDF12-CONCEPTS]]] [[RDF12-CONCEPTS]]; returns FALSE otherwise.</p>
5679
-
5680
- <p class="ednote" style="background-color: #EEE">
5681
- Finalize when
5682
- <a href="https://github.com/w3c/rdf-concepts/issues/154">RDF Concepts issue 154</a>
5683
- has been resolved.
5684
- </p>
5685
-
5686
5679
<p>
5687
- <code>term1</code> and <code>term2</code> are <em>equal</em> RDF terms
5688
- if any of the following is true:</p>
5680
+ |term1| and |term2| are
5681
+ <a data-cite="RDF12-CONCEPTS#dfn-rdf-term-equality">equal RDF terms</a>
5682
+ if one of the following is true:
5683
+ </p>
5689
5684
<ul>
5690
- <li>
5691
- <span class="name">term1</span> is an <span class="IRI type">IRI</span>
5692
- and <span class="name">term2</span> is an <span class="IRI type">IRI</span>
5693
- such that these two <span class="IRI type">IRIs</span> are equal as per
5694
- the notion of <a data-cite="RDF12-CONCEPTS#dfn-iri-equality">IRI equality</a> of
5695
- [[RDF12-CONCEPTS]].
5685
+ <li><code>term1</code> and <code>term2</code> are
5686
+ <a data-cite="RDF12-CONCEPTS#iri">IRIs</a> that are
5687
+ <a data-cite="RDF12-CONCEPTS#dfn-iri-equality">equal as IRIs</a>.
5696
5688
</li>
5697
- <li>
5698
- <span class="name">term1</span> is a <span class="literal type">literal</span> and
5699
- <span class="name">term2</span> is a <span class="literal type">literal</span> such
5700
- that these two <span class="literal type">literals</span> are equal as per the
5701
- notion of
5702
- <a data-cite="RDF12-CONCEPTS#dfn-literal-term-equality">Literal term equality</a>
5703
- of [[RDF12-CONCEPTS]].
5689
+ <li><code>term1</code> and <code>term2</code> are
5690
+ <a data-cite="RDF12-CONCEPTS#dfn-literal">literals</a> that are
5691
+ <a data-cite="RDF12-CONCEPTS#dfn-literal-term-equality">equal as literal terms</a>.
5704
5692
</li>
5705
- <li>
5706
- <span class="name">term1</span> and <span class="name">term2</span> are the same
5707
- <a data-cite="RDF12-CONCEPTS#dfn-blank-node"> blank node </a>
5693
+ <li><code>term1</code> and <code>term2</code> are
5694
+ <a data-cite="RDF12-CONCEPTS#dfn-blank-node">blank nodes</a> that are
5695
+ <a data-cite="RDF12-CONCEPTS#dfn-blank-node-equality">equal as blank nodes </a>.
5708
5696
</li>
5709
- <li>
5710
- <span class="name">term1</span> and <span class="name">term2</span> are both
5711
- <a data-cite="RDF12-CONCEPTS#dfn-triple-term">triple terms</a> and the
5697
+ <li><code>term1</code> and <code>term2</code> are
5698
+ <a data-cite="RDF12-CONCEPTS#dfn-triple-term">triple terms</a> that are
5699
+ <a data-cite="RDF12-CONCEPTS#dfn-triple-term-equality">equal as triple terms</a>; that
5700
+ is, the
5712
5701
<a data-cite="RDF12-CONCEPTS#dfn-subject">subject</a>,
5713
5702
<a data-cite="RDF12-CONCEPTS#dfn-predicate">predicate</a>, and
5714
- <a data-cite="RDF12-CONCEPTS#dfn-object">object</a> components are pair-wise the same term.
5703
+ <a data-cite="RDF12-CONCEPTS#dfn-object">object</a> components are pair-wise
5704
+ the same term.
5715
5705
</li>
5716
5706
</ul>
5717
-
5718
5707
<div class="result">
5719
5708
<table>
5720
5709
<tbody>
@@ -5758,10 +5747,11 @@ <h5>sameTerm</h5>
5758
5747
</div>
5759
5748
5760
5749
</section>
5761
- <section id="func-RDFterm-equal">
5762
- <h5>RDFterm-equal</h5>
5750
+ <section id="func-sameValue">
5751
+ <span id="func-RDFterm-equal"><!-- obsolete id --></span>
5752
+ <h5>SameValue</h5>
5763
5753
<pre class="prototype nohighlight">
5764
- <span class="return">xsd:boolean</span> <span class="operator" style="text-transform: none;">RDFterm-equal </span> (<span class="type"><span class="type RDFterm">RDF term</span></span> <span class="name">term1</span>, <span class="type"><span class="type RDFterm">RDF term</span></span> <span class="name">term2</span>)
5754
+ <span class="return">xsd:boolean</span> <span class="operator" style="text-transform: none;">sameValue </span> (<span class="type"><span class="type RDFterm">RDF term</span></span> <span class="name">term1</span>, <span class="type"><span class="type RDFterm">RDF term</span></span> <span class="name">term2</span>)
5765
5755
</pre>
5766
5756
5767
5757
<p>This function cannot be used directly in expressions. The purpose
@@ -5771,21 +5761,19 @@ <h5>RDFterm-equal</h5>
5771
5761
<a href="#OperatorMapping" class="sectionRef"></a>.
5772
5762
</p>
5773
5763
5774
- <p class="ednote" style="background-color: #EEE">
5775
- This will be renamed <code>sameValue</code></p>
5776
-
5777
5764
<ol>
5778
5765
<li>If one or both arguments are known to be ill-typed,
5779
5766
then produce a type error.
5780
5767
</li>
5781
- <li>Returns TRUE if <code>term1</code> and <code>term2</code>
5782
- are <em >equal</em> RDF terms, as defined below .
5768
+ <li>Returns TRUE if <code>term1</code> and <code>term2</code> are
5769
+ <a data-cite="RDF12-CONCEPTS#dfn-rdf-term-equality" >equal RDF terms</a> .
5783
5770
</li>
5784
5771
<li>If the SPARQL processor can determine the values of both terms
5785
5772
and it can determine the values are equal, then return TRUE.
5786
5773
</li>
5787
5774
<li>If the SPARQL processor can determine that the values of the terms
5788
- can not be equal, the return FALSE.</li>
5775
+ can not be equal, the return FALSE.
5776
+ </li>
5789
5777
</ol>
5790
5778
5791
5779
<div class="ednote" style="background-color: #EEE" >
@@ -5842,7 +5830,7 @@ <h5>RDFterm-equal</h5>
5842
5830
of the datatype.
5843
5831
</p>
5844
5832
<p>
5845
- The function `RDFterm-equal ` returns true or false in cases where
5833
+ The function `sameValue ` returns true or false in cases where
5846
5834
the SPARQL processor can determine that the values of the
5847
5835
arguments are equal or are not equal. If the SPARQL processor
5848
5836
can not be sure, it returns `error`.
@@ -5859,30 +5847,26 @@ <h5>RDFterm-equal</h5>
5859
5847
`sameTerm("NaN"^^xsd:double, "NaN"^^xsd:float)` is `true`.
5860
5848
</p>
5861
5849
</div>
5850
+ <div id="sameValue-old-name" class="note">
5851
+ <p>This function was previously called `RDFterm-equal`.</p>
5852
+ </div>
5862
5853
5863
5854
<div class="ednote" style="background-color: #EEE">
5864
5855
<p>
5865
- @@ Describe error as extension
5866
- </p>
5867
- <p>
5868
- Possible examples:
5869
- `sameValue("abc"^^xsd:string, "IV"^^ex:romanNumeral)`
5870
- <br/>
5871
- A processor providing only the datatypes required by this spec
5872
- returns `error` because it can not know that `ex:romanNumeral`
5873
- is a number.
5874
- </p>
5875
- <p>
5876
- sameValue("32"^^x:meters, "3200"^^x:centimeters)
5877
- </p>
5878
- <p>
5879
- sameValue("abc"^^xsd:integer, "123"^^xsd:integer) -- `error` by (1)
5880
- argument 1 is
5881
- <a data-cite="RDF12-CONCEPTS#dfn-ill-typed">ill-typed</a>.
5856
+ A SPARQL processor may support datatypes beyond those required.
5857
+ Suppose `ex:romanNumeral` is the datatype IRI
5858
+ <a href="https://en.wikipedia.org/wiki/Roman_numerals">roman numerals</a>
5859
+ which are integer numbers. The SPARQL processor may then be able
5860
+ to detemine if two literals have the same value, for example,
5861
+ `sameValue(4, "IV"^^ex:romanNumeral)` can then return `true`
5862
+ because argument bot represent the value 4.
5863
+ For `sameValue("abc"^^xsd:string, "IV"^^ex:romanNumeral)`
5864
+ can return `false` because `xsd:string` and `ex:romanNumeral`
5865
+ have different value spaces so the arguments can not be the same value.
5882
5866
</p>
5883
5867
</div>
5884
5868
5885
- <p id="func-RDFterm-equal -note1" class="note">
5869
+ <p id="func-sameValue -note1" class="note">
5886
5870
An extended implementation may support additional datatypes for literals. An
5887
5871
implementation processing a query that tests for equivalence of literals with non-recognized datatypes
5888
5872
(and non-identical lexical form and datatype IRI) returns an error, indicating that it
@@ -5897,7 +5881,7 @@ <h5>RDFterm-equal</h5>
5897
5881
<table>
5898
5882
<tbody>
5899
5883
<tr>
5900
- <th>RDFterm-equal </th>
5884
+ <th>sameValue </th>
5901
5885
<th>Results</th>
5902
5886
</tr>
5903
5887
<tr>
@@ -5909,12 +5893,16 @@ <h5>RDFterm-equal</h5>
5909
5893
<td>true</td>
5910
5894
</tr>
5911
5895
<tr>
5912
- <td><code> </code></td>
5913
- <td></td>
5896
+ <td><code>sameValue(2, "2") </code></td>
5897
+ <td>false </td>
5914
5898
</tr>
5915
5899
<tr>
5916
5900
<td><code>sameValue(4, "iv"^^my:romanNumeral)</code></td>
5917
- <td>error or extension</td>
5901
+ <td>error, or true by extension</td>
5902
+ </tr>
5903
+ <tr>
5904
+ <td><code>sameValue(1e10, "NaN"^^xsd:double)</code></td>
5905
+ <td>false</td>
5918
5906
</tr>
5919
5907
<tr>
5920
5908
<td><code>sameValue("NaN"^^xsd:double, "NaN"^^xsd:double)</code></td>
@@ -5927,8 +5915,6 @@ <h5>RDFterm-equal</h5>
5927
5915
</tbody>
5928
5916
</table>
5929
5917
</div>
5930
-
5931
-
5932
5918
</section>
5933
5919
5934
5920
<section id="func-isIRI">
@@ -12271,10 +12257,10 @@ <h2>Changes between SPARQL 1.1 Query Language and SPARQL 1.2 Query Language</h2>
12271
12257
<li>
12272
12258
Editorial changes:
12273
12259
<ul>
12274
- <li>Define RDFterm-equal using an actual function signature in <a href="#func-RDFterm-equal " class="sectionRef"></a></li>
12260
+ <li>Give a actual function signature to <a href="#func-sameValue " class="sectionRef"></a></li>
12275
12261
<li>Improve wording of blank nodes in <a href="#templatesWithBNodes" class="sectionRef"></a></li>
12276
12262
<li>Improve display on mobile</li>
12277
- <li>Move RDFterm-equal and sameTerm to <a href="#func-rdfTerms" class="sectionRef"></a></li>
12263
+ <li>Move `sameValue` (was ` RDFterm-equal`) and ` sameTerm` to <a href="#func-rdfTerms" class="sectionRef"></a></li>
12278
12264
<li>Add note on deduplication of triples produced by CONSTRUCT to <a href="#construct" class="sectionRef"></a></li>
12279
12265
<li>Remove historical notes on rdf:langString datatype from <a href="#func-datatype" class="sectionRef"></a></li>
12280
12266
<li>Remove inconsistencies between the definitions of the set functions</li>
@@ -12299,7 +12285,7 @@ <h2>Changes between SPARQL 1.1 Query Language and SPARQL 1.2 Query Language</h2>
12299
12285
<li><a href="https://www.w3.org/2013/sparql-errata#editorial-query-3">editorial-query-3</a>: Incorrect link for DELETE DATA in <a href="#grammarBNodes" class="sectionRef"></a></li>
12300
12286
<li><a href="https://www.w3.org/2013/sparql-errata#clarification-query-1">clarification-query-1</a>: Fix explanation of IN and NOT IN in <a href="#func-in" class="sectionRef"></a> and <a href="#func-not-in" class="sectionRef"></a></li>
12301
12287
<li><a href="https://www.w3.org/2013/sparql-errata#clarification-query-2">clarification-query-2</a>: Remove unneeded reference to the semantics above in <a href="#operatorExtensibility" class="sectionRef"></a></li>
12302
- <li><a href="https://www.w3.org/2013/sparql-errata#clarification-query-3">clarification-query-3</a>: Rephrase equality definition in <a href="#func-RDFterm-equal " class="sectionRef"></a></li>
12288
+ <li><a href="https://www.w3.org/2013/sparql-errata#clarification-query-3">clarification-query-3</a>: Rephrase equality definition in <a href="#func-sameValue " class="sectionRef"></a></li>
12303
12289
<li><a href="https://www.w3.org/2013/sparql-errata#errata-query-1">errata-query-1</a>: Let V be an empty set instead of empty multiset in <a href="#defn_evalALP_1">Function ALP definition</a></li>
12304
12290
<li><a href="https://www.w3.org/2013/sparql-errata#errata-query-2">errata-query-2</a>: Fix grammar of PropertyListPathNotEmpty in <a href="#grammar" class="sectionRef"></a></li>
12305
12291
<li><a href="https://www.w3.org/2013/sparql-errata#errata-query-4">errata-query-4</a>: Fix CONCAT definition for zero and one argument in <a href="#func-concat" class="sectionRef"></a></li>
0 commit comments