From 72b9e2cbbb4bd19d81a19068b14f2e6a73b8f8f0 Mon Sep 17 00:00:00 2001 From: Ruben Taelman Date: Mon, 12 Aug 2024 08:39:37 +0200 Subject: [PATCH 1/5] Migrate from quoted triples to triple terms --- spec/index.html | 53 ++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/spec/index.html b/spec/index.html index 8e6c1ce..4a658e1 100644 --- a/spec/index.html +++ b/spec/index.html @@ -7406,16 +7406,16 @@
TZ
-
-

Functions on Quoted Triples

+
+

Functions on Triple Terms

TRIPLE
-              quoted triple  TRIPLE (RDF term subj, RDF term pred, RDF term triple term  TRIPLE (RDF term subj, RDF term pred, RDF term obj)
             
-                  << subj pred obj >>
+                  <<( subj pred obj )>>
             

If the 3-tuple (subj, @@ -7423,27 +7423,26 @@

TRIPLE
obj) is an RDF triple (that is, subj is an - IRI, - quoted triple or + IRI or blank node; pred is an IRI; and obj is an IRI, - quoted triple, + triple term, blank node or literal) - the function returns a quoted triple with these three elements. + the function returns a triple term with these three elements. Otherwise, the function raises an error.

As a shorthand notation, the TRIPLE function can also be written in the form of a - quoted triple expression - using << and >>. There is a + triple term expression + using <<( and )>>. There is a syntax limitation to this shorthand form: the three elements of - the quoted triple expression can only be variables and directly + the triple term expression can only be variables and directly written RDF terms, not arbitrary expressions. In contrast, the function form, TRIPLE, can be used with arbitrary expressions. @@ -7452,7 +7451,7 @@

TRIPLE
PREFIX : <http://example/> SELECT ?s ?date { ?s ?p ?o - BIND( << ?s ?p ?o >> AS ?qt ) + BIND( <<( ?s ?p ?o )>> AS ?qt ) ?qt :tripleAdded ?date } @@ -7468,45 +7467,45 @@
TRIPLE
SUBJECT
-
RDF term  SUBJECT (quoted triple quoted-triple)
+
RDF term  SUBJECT (triple term triple-term)

If the argument is a - quoted triple, + triple term, the function returns the subject - of the quoted triple. + of the triple term. If the argument is not a - quoted triple, + triple term, an error is raised.

PREDICATE
-
RDF term  PREDICATE (quoted triple quoted-triple)
+
RDF term  PREDICATE (triple term triple-term)

If the argument is a - quoted triple, + triple term, the function returns the predicate - of the quoted triple. + of the triple term. If the argument is not a - quoted triple, + triple term, an error is raised.

OBJECT
-
RDF term  OBJECT (quoted triple quoted-triple)
+
RDF term  OBJECT (triple term triple-term)

If the argument is a - quoted triple, + triple term, the function returns the object - of the quoted triple. + of the triple term. If the argument is not a - quoted triple, + triple term, an error is raised.

@@ -7515,7 +7514,7 @@
OBJECT
isTRIPLE
xsd:boolean  isTRIPLE (RDF term term)

- If the argument is a quoted triple, + If the argument is a triple term, the function returns true. If the argument is any other kind of RDF term, @@ -11806,10 +11805,10 @@

Changes between SPARQL 1.1 Query Language and SPARQL 1.2 Query Language

Normative changes:
  • Remove concepts of plain and simple literals, in favor of explicit mentions of xsd:string
  • -
  • Update grammar for quoted triples and triple functions in
  • +
  • Update grammar for triple terms and triple functions in
  • Migrate XML Schema references to 1.1
  • Update references to XPath from 2.0 to 3.1
  • -
  • Add functions on quoted triples to
  • +
  • Add functions on triple terms to
  • From 118528fb28ee78efe419facac3e903431f0f5b9a Mon Sep 17 00:00:00 2001 From: Ruben Taelman Date: Wed, 21 Aug 2024 11:53:46 +0200 Subject: [PATCH 2/5] Use reified triples in examples --- spec/index.html | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/spec/index.html b/spec/index.html index 4a658e1..99e29d4 100644 --- a/spec/index.html +++ b/spec/index.html @@ -7406,8 +7406,8 @@
    TZ
  • -
    -

    Functions on Triple Terms

    +
    +

    Functions on Reified Triples

    TRIPLE
    @@ -7439,7 +7439,7 @@ 
    TRIPLE

    As a shorthand notation, the TRIPLE function can also be written in the form of a - triple term expression + triple term expression using <<( and )>>. There is a syntax limitation to this shorthand form: the three elements of the triple term expression can only be variables and directly @@ -7449,18 +7449,24 @@

    TRIPLE

                   PREFIX : <http://example/>
    +              PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    +
                   SELECT ?s ?date {
    -                  ?s ?p ?o
    -                  BIND( <<( ?s ?p ?o )>> AS ?qt )
    -                  ?qt :tripleAdded ?date
    +                  ?s ?p ?o .
    +                  BIND( <<( ?s ?p ?o )>> AS ?tt )
    +                  :myreifier rdf:reifies ?tt .
    +                  :myreifier :tripleAdded ?date .
                   }
                 
                   PREFIX : <http://example/>
    +              PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    +
                   SELECT ?s ?date {
    -                  ?s ?p ?o
    -                  BIND( TRIPLE(?s, ?p, ?o) AS ?qt )
    -                  ?qt :tripleAdded ?date
    +                  ?s ?p ?o .
    +                  BIND( TRIPLE(?s, ?p, ?o) AS ?tt )
    +                  :myreifier rdf:reifies ?tt .
    +                  :myreifier :tripleAdded ?date .
                   }
                 
    @@ -11805,10 +11811,10 @@

    Changes between SPARQL 1.1 Query Language and SPARQL 1.2 Query Language

    Normative changes:
    • Remove concepts of plain and simple literals, in favor of explicit mentions of xsd:string
    • -
    • Update grammar for triple terms and triple functions in
    • +
    • Update grammar for reified triples and triple functions in
    • Migrate XML Schema references to 1.1
    • Update references to XPath from 2.0 to 3.1
    • -
    • Add functions on triple terms to
    • +
    • Add functions on reified triples to
  • From 47e936a64fee20d671b80cca3501aecad1675046 Mon Sep 17 00:00:00 2001 From: Ruben Taelman Date: Thu, 22 Aug 2024 08:24:58 +0200 Subject: [PATCH 3/5] Update spec/index.html Co-authored-by: Olaf Hartig --- spec/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/index.html b/spec/index.html index 99e29d4..8260b13 100644 --- a/spec/index.html +++ b/spec/index.html @@ -7406,8 +7406,8 @@
    TZ
  • -
    -

    Functions on Reified Triples

    +
    +

    Functions on Triple Terms

    TRIPLE
    
    From bfef76f612989e48e43fca5df1273a45037187bb Mon Sep 17 00:00:00 2001
    From: Ruben Taelman 
    Date: Thu, 22 Aug 2024 08:25:06 +0200
    Subject: [PATCH 4/5] Update spec/index.html
    
    Co-authored-by: Olaf Hartig 
    ---
     spec/index.html | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/spec/index.html b/spec/index.html
    index 8260b13..86ae35e 100644
    --- a/spec/index.html
    +++ b/spec/index.html
    @@ -11811,7 +11811,7 @@ 

    Changes between SPARQL 1.1 Query Language and SPARQL 1.2 Query Language

    Normative changes:
    • Remove concepts of plain and simple literals, in favor of explicit mentions of xsd:string
    • -
    • Update grammar for reified triples and triple functions in
    • +
    • Update grammar for triple terms and triple functions in
    • Migrate XML Schema references to 1.1
    • Update references to XPath from 2.0 to 3.1
    • Add functions on reified triples to
    • From 8dcff49e6366ba7ae4eaab7e9cae74580cf66c10 Mon Sep 17 00:00:00 2001 From: Ruben Taelman Date: Thu, 22 Aug 2024 08:25:13 +0200 Subject: [PATCH 5/5] Update spec/index.html Co-authored-by: Olaf Hartig --- spec/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/index.html b/spec/index.html index 86ae35e..b764340 100644 --- a/spec/index.html +++ b/spec/index.html @@ -11814,7 +11814,7 @@

      Changes between SPARQL 1.1 Query Language and SPARQL 1.2 Query Language

    • Update grammar for triple terms and triple functions in
    • Migrate XML Schema references to 1.1
    • Update references to XPath from 2.0 to 3.1
    • -
    • Add functions on reified triples to
    • +
    • Add functions on triple terms to