- From: james anderson <james@dydra.com>
- Date: Sat, 5 Dec 2015 21:33:18 +0000
- To: public-sparql-dev@w3.org
- Message-ID: <000001517410369b-3368218e-d42f-41f6-8551-2461f68fcf26-000000@eu-west-1.amazonse>
good evening; > On 2015-12-05, at 21:30, Tara Athan <taraathan@gmail.com> wrote: > > I found this paper http://ceur-ws.org/Vol-749/paper19.pdf <http://ceur-ws.org/Vol-749/paper19.pdf> which proposes allowing CONSTRUCT to be nested within FROM and FROM NAMED. I would be interested to know if any engines have implemented this as an extension. > > > I gather that this was considered in the development of SPARQL 1.1, but not adopted: http://www.w3.org/2009/sparql/track/issues/7 <http://www.w3.org/2009/sparql/track/issues/7> > I don't understand the justification of the closure > > ISSUE-7 > > CONSTRUCT & DESCRIBE queries in FROM [NAMED]? > > ?? > > CONSTRUCT not needed if bNodes can be introduced by constructor. > > I looked for emails that explain how introducing bNodes by a constructor can take the place of composition of CONSTRUCT ( I can't imagine how this can be the case, but am willing to read the arguments...) but I can't find it. > > As background, the usecase I am considering is a CONSTRUCT view that creates a virtual RDF dataset (using the Construct Quad extension) and then exposes this virtual view to the user for further queries (which could be CONSTRUCT, SELECT, or whatever.) This would have the effect of inserting the CONSTRUCT view into the FROM clause of the users query. angles/gutierrez proposes three forms of subquery. sparql 1.1 includes the second and third forms. the first one (from / from named) is less effective then the second, as it is not possible to place the results. they would have to be merged into the default graph or made available as a named graph. the subselect form allows to accomplish the same result as that which would be produced by the generated dataset combined with the eventual graph pattern in the query itself. taking, for instance, their example 2: SELECT ?M1 ?M2 FROM <http://.../people.rdf> FROM ( CONSTRUCT { ?A1 co-author ?A2 } FROM <http://.../biblio.rdf> WHERE { ?Pub author ?A1 . ?Pub author ?A2 . FILTER ( !(?A1 = ?A2) ) } ) WHERE { ?P1 co-author ?P2 . ?P1 mail ?M1 . ?P2 mail ?M2 } would be PREFIX : <http:/example.org/> SELECT ?M1 ?M2 FROM <http://.../people.rdf> FROM NAMED <http://.../biblio.rdf> WHERE { { SELECT ?P1 ?P2 WHERE { GRAPH <http://.../biblio.rdf> { ?Pub :author ?A1 . ?Pub :author ?A2 . FILTER ( !(?A1 = ?A2) ) } } } ?P1 :mail ?M1 . ?P2 :mail ?M2 } best regards, from berlin, --- james anderson | james@dydra.com | http://dydra.com
Received on Saturday, 5 December 2015 21:33:51 UTC