Skip to content

Commit 03fb4e0

Browse files
committed
Only literal sameValue can be extended
1 parent 133f5cd commit 03fb4e0

File tree

1 file changed

+41
-35
lines changed

1 file changed

+41
-35
lines changed

spec/index.html

Lines changed: 41 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5672,19 +5672,19 @@
NOT IN
56725672

Functions on RDF Terms

56735673

56745674
5675-
SameTerm
5675+
sameTerm
56765676
 xsd:boolean  sameTerm (RDF term term1, RDF term term2)
56775677

Returns TRUE if term1 and term2 are the same RDF term as

56785678
defined in [[[RDF12-CONCEPTS]]] [[RDF12-CONCEPTS]]; returns FALSE otherwise.

56795679

5680-
|term1| and |term2| are
5681-
5680+
|term1| and |term2| are the
5681+
56825682
if one of the following is true:
56835683

56845684
    56855685
  • term1 and term2 are
  • 5686-
    IRIs that are
    5687-
    5686+
    IRIs that are the
    5687+
    56885688
    56895689
  • term1 and term2 are
  • 56905690
    literals that are
    @@ -5729,7 +5729,7 @@
    SameTerm
    57295729
    57305730
    57315731
    sameTerm("abc"@en--rtl, "abc"@en)
    5732-
    true
    5732+
    false
    57335733
    57345734
    57355735
    sameTerm(2, 2.0)
    @@ -5749,7 +5749,7 @@
    SameTerm
    57495749
    57505750
    57515751
    5752-
    SameValue
    5752+
    sameValue
    57535753
    57545754
    xsd:boolean sameValue (RDF term term1, RDF term term2)
    57555755
    @@ -5761,31 +5761,37 @@
    SameValue
    57615761
    .
    57625762

    57635763

    5764+

    5765+
    Revise for triple terms.
    5766+

    5767+
    Consider adding non-literal `=` to operator mapping table.
    5768+

    5769+
    5770+

    The result of this function is determined by going through the following steps.

    57645771
      5765-
    1. If one or both arguments are known to be ill-typed,
    2. 5772+
    3. If term1 and term2 are
    4. 5773+
      5774+
      the return TRUE.
      5775+
      5776+
    5. If both arguments are literals,
    6. 5777+
      5778+
      and one or both arguments are known to be ill-typed,
      57665779
      then produce a type error.
      57675780
      5768-
    7. Returns TRUE if term1 and term2 are
    8. 5769-
      5781+
    9. If term1 and term2 both
    10. 5782+
      5783+
      and the SPARQL processor can determine the values are equal,
      5784+
      then return TRUE.
      57705785
      5771-
    11. If the SPARQL processor can determine the values of both terms
    12. 5772-
      and it can determine the values are equal, then return TRUE.
      5786+
    13. If term1 and term2 both
    14. 5787+
      5788+
      and the SPARQL processor can determine the values can not be equal,
      5789+
      then return FALSE.
      57735790
      5774-
    15. If the SPARQL processor can determine that the values of the terms
    16. 5775-
      can not be equal, the return FALSE.
      5791+
    17. Otherwise, return FALSE.
    18. 57765792
      57775793
      5778-
      5779-
      5780-

      If the function is to become callable as

      5781-
      `sameValue(term1, term2)`, add a rule
      5782-
      that if there is an
      5783-
      5784-
      for the arguments, an implementation MUST return the same boolean value
      5785-
      from `sameValue(term1, term2)`.
      5786-

      5787-
      5788-
      5794+
      57895795

      57905796
      The treatment of `NaN` can not be consistent with both "same term means same value"
      57915797
      and "`fn:numeric-equal(NaN, NaN)` is false". So it is an arbitrary choice with
      @@ -5824,23 +5830,23 @@
      SameValue
      58245830
      58255831

      A literal is

      58265832
      5827-
      if the datatype is one handled by the SPARQL processor and
      5828-
      the lexical form is not in
      5829-
      5833+
      if its datatype is handled by the SPARQL processor and
      5834+
      its lexical form is not in the
      5835+
      58305836
      of the datatype.
      58315837

      58325838

      5833-
      The function `sameValue` returns true or false in cases where
      5834-
      the SPARQL processor can determine that the values of the
      5835-
      arguments are equal or are not equal. If the SPARQL processor
      5836-
      can not be sure, it returns `error`.
      5839+
      If the two arguments are literals, the function `sameValue`
      5840+
      returns `true` or `false` in cases where the SPARQL processor
      5841+
      can determine that the values of these literals are equal or are not equal.
      5842+
      If the SPARQL processor can not be sure, it returns `error`.
      58375843

      58385844
      58395845
      58405846

      5841-
      The Operator Mapping for "`=`""
      5847+
      The Operator Mapping for "`=`"
      58425848
      is the function
      5843-
      5849+
      58445850
      which returns `false` when comparing arguments involving `NaN`.
      58455851
      However, `sameTerm("NaN"^^xsd:double, "NaN"^^xsd:double)` is true;
      58465852
      `sameValue` treats "NaN" as the "same value".
      @@ -12257,7 +12263,7 @@

      Changes between SPARQL 1.1 Query Language and SPARQL 1.2 Query Language

      1225712263
    19. 1225812264
      Editorial changes:
      1225912265
        12260-
      • Give a actual function signature to
      • 12266+
      • Give an actual function signature to
      • 1226112267
      • Improve wording of blank nodes in
      • 1226212268
      • Improve display on mobile
      • 1226312269
      • Move `sameValue` (was `RDFterm-equal`) and `sameTerm` to
      • 0 commit comments

        Comments
         (0)