W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2010

stumbled upon ACTION-200 CONSTRUCT WHERE shortcut...

From: Axel Polleres <axel.polleres@deri.org>
Date: Mon, 13 Dec 2010 20:12:18 +0000
Message-Id: <610B9511-4A05-49E1-9EC8-E71251DB82D8@deri.org>
To: SPARQL Working Group <public-rdf-dawg@w3.org>
Hi all,

I found this old action lying around, haven't found any notes on it, so I thought I just draft something:

If we want that still, my suggestion would be to 

1) change

[9]  ConstructQuery  ::=  'CONSTRUCT' ConstructTemplate DatasetClause* WhereClause SolutionModifier

to

[9]  ConstructQuery  ::=  ( 'CONSTRUCT' ConstructTemplate DatasetClause* WhereClause SolutionModifier ) |
                          ( 'CONSTRUCT' DatasetClause* 'WHERE' ConstructTemplate  SolutionModifier )

would that work with the grammar?


2) add a subsection 


<div3 id="CONSTRUCTWHERE">
<head>CONSTRUCT WHERE</head>
<p>In case the construct template is identical to the WHERE clause, i.e. the triples matched by the WHERE clause 
form the result graph, the CONSTRUCT Query form can be used in an abbreviated version, omitting the template.</p>

<p>For example, for the same data graph as before, the following query copies all foaf:name triples to the result graph.</p>

<pre class=query
  PREFIX foaf: <http://xmlns.com/foaf/0.1/>
  PREFIX site: <http://example.org/stats#>

  CONSTRUCT WHERE { ?person foaf:name ?name }
</pre>
</div3>






Axel

 
Received on Monday, 13 December 2010 20:31:25 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:44 GMT