Skip to content

Commit 85ef5b7

Browse files
committed
GH-25: Rename RDFterm-equal to sameValue
1 parent 49052af commit 85ef5b7

File tree

1 file changed

+56
-70
lines changed

1 file changed

+56
-70
lines changed

spec/index.html

Lines changed: 56 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -5281,7 +5281,7 @@ <h3>Operator Mapping</h3>
52815281
<td><span class="type RDFterm">RDF term</span></td>
52825282
<td><span class="type RDFterm">RDF term</span></td>
52835283
<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)
52855285
</td>
52865286
<td>xsd:boolean</td>
52875287
</tr>
@@ -5292,7 +5292,7 @@ <h3>Operator Mapping</h3>
52925292
<td><span class="type RDFterm">RDF term</span></td>
52935293
<td><span class="type RDFterm">RDF term</span></td>
52945294
<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))
52965296
</td>
52975297
<td>xsd:boolean</td>
52985298
</tr>
@@ -5672,49 +5672,38 @@ <h5>NOT IN</h5>
56725672
<h4>Functions on RDF Terms</h4>
56735673

56745674
<section id="func-sameTerm">
5675-
<h5>sameTerm</h5>
5675+
<h5>SameTerm</h5>
56765676
<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>
56775677
<p>Returns TRUE if <code>term1</code> and <code>term2</code> are the same RDF term as
56785678
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-
56865679
<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>
56895684
<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>.
56965688
</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>.
57045692
</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>.
57085696
</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
57125701
<a data-cite="RDF12-CONCEPTS#dfn-subject">subject</a>,
57135702
<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.
57155705
</li>
57165706
</ul>
5717-
57185707
<div class="result">
57195708
<table>
57205709
<tbody>
@@ -5758,10 +5747,11 @@ <h5>sameTerm</h5>
57585747
</div>
57595748

57605749
</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>
57635753
<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>)
57655755
</pre>
57665756

57675757
<p>This function cannot be used directly in expressions. The purpose
@@ -5771,21 +5761,19 @@ <h5>RDFterm-equal</h5>
57715761
<a href="#OperatorMapping" class="sectionRef"></a>.
57725762
</p>
57735763

5774-
<p class="ednote" style="background-color: #EEE">
5775-
This will be renamed <code>sameValue</code></p>
5776-
57775764
<ol>
57785765
<li>If one or both arguments are known to be ill-typed,
57795766
then produce a type error.
57805767
</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>.
57835770
</li>
57845771
<li>If the SPARQL processor can determine the values of both terms
57855772
and it can determine the values are equal, then return TRUE.
57865773
</li>
57875774
<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>
57895777
</ol>
57905778

57915779
<div class="ednote" style="background-color: #EEE" >
@@ -5842,7 +5830,7 @@ <h5>RDFterm-equal</h5>
58425830
of the datatype.
58435831
</p>
58445832
<p>
5845-
The function `RDFterm-equal` returns true or false in cases where
5833+
The function `sameValue` returns true or false in cases where
58465834
the SPARQL processor can determine that the values of the
58475835
arguments are equal or are not equal. If the SPARQL processor
58485836
can not be sure, it returns `error`.
@@ -5859,30 +5847,26 @@ <h5>RDFterm-equal</h5>
58595847
`sameTerm("NaN"^^xsd:double, "NaN"^^xsd:float)` is `true`.
58605848
</p>
58615849
</div>
5850+
<div id="sameValue-old-name" class="note">
5851+
<p>This function was previously called `RDFterm-equal`.</p>
5852+
</div>
58625853

58635854
<div class="ednote" style="background-color: #EEE">
58645855
<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.
58825866
</p>
58835867
</div>
58845868

5885-
<p id="func-RDFterm-equal-note1" class="note">
5869+
<p id="func-sameValue-note1" class="note">
58865870
An extended implementation may support additional datatypes for literals. An
58875871
implementation processing a query that tests for equivalence of literals with non-recognized datatypes
58885872
(and non-identical lexical form and datatype IRI) returns an error, indicating that it
@@ -5897,7 +5881,7 @@ <h5>RDFterm-equal</h5>
58975881
<table>
58985882
<tbody>
58995883
<tr>
5900-
<th>RDFterm-equal</th>
5884+
<th>sameValue</th>
59015885
<th>Results</th>
59025886
</tr>
59035887
<tr>
@@ -5909,12 +5893,16 @@ <h5>RDFterm-equal</h5>
59095893
<td>true</td>
59105894
</tr>
59115895
<tr>
5912-
<td><code>&nbsp;</code></td>
5913-
<td></td>
5896+
<td><code>sameValue(2, "2")</code></td>
5897+
<td>false</td>
59145898
</tr>
59155899
<tr>
59165900
<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>
59185906
</tr>
59195907
<tr>
59205908
<td><code>sameValue("NaN"^^xsd:double, "NaN"^^xsd:double)</code></td>
@@ -5927,8 +5915,6 @@ <h5>RDFterm-equal</h5>
59275915
</tbody>
59285916
</table>
59295917
</div>
5930-
5931-
59325918
</section>
59335919

59345920
<section id="func-isIRI">
@@ -12271,10 +12257,10 @@ <h2>Changes between SPARQL 1.1 Query Language and SPARQL 1.2 Query Language</h2>
1227112257
<li>
1227212258
Editorial changes:
1227312259
<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>
1227512261
<li>Improve wording of blank nodes in <a href="#templatesWithBNodes" class="sectionRef"></a></li>
1227612262
<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>
1227812264
<li>Add note on deduplication of triples produced by CONSTRUCT to <a href="#construct" class="sectionRef"></a></li>
1227912265
<li>Remove historical notes on rdf:langString datatype from <a href="#func-datatype" class="sectionRef"></a></li>
1228012266
<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>
1229912285
<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>
1230012286
<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>
1230112287
<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>
1230312289
<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>
1230412290
<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>
1230512291
<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

Comments
 (0)