W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > July 2012

Re: Multiple BINDING clauses in SPARQL queries

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Fri, 13 Jul 2012 15:08:12 +0100
Message-ID: <50002BCC.8080207@epimorphics.com>
To: public-rdf-dawg-comments@w3.org

Thank you for your comments on BINDINGS.

The working group has reworked what was previously BINDINGS with a new 
VALUES clause that can be used for inline data at any point in the graph 
pattern where a pattern group element can be given. The details are in 
the editors' working draft [1] and the grammar.

The syntax is a little different from BINDINGS to make the one 
variable/several variables cases a little clearer as this is the 
emerging use for VALUES, not it's original motivation from federated query.


      VALUES ?x { :x1 :x2 }
      ?x rdfs:label ?label .

     VALUES (?dayIDCheck ?dayName) {
     (0 "Sunday"@en)
     (1 "Monday"@en)
     (2 "Tuesday"@en)
     (3 "Wednesday"@en)
     (4 "Thursday"@en)
     (5 "Friday"@en)
     (6 "Saturday"@en) }
     BIND (0 AS ?dayID)
     FILTER (?dayIDCheck = ?dayID)

VALUES can be used where BINDINGSs was allowed but also multiple VALUES 
clauses are allowed within the graph pattern and will cause a join of 
each table of inline data with the query pattern matching. VALUES 
clauses are allowed on sub-queries.

We would be grateful if you would acknowledge that your comments have 
been answered by sending a reply to this mailing list.

Andy, on behalf of the SPARQL WG.

[1] http://www.w3.org/2009/sparql/docs/query-1.1/rq25.xml#inline-data
Received on Friday, 13 July 2012 14:08:48 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:01:30 UTC