W3C home > Mailing lists > Public > public-sparql-dev@w3.org > April to June 2014

Re: Descendants

From: Olivier Corby <olivier.corby@inria.fr>
Date: Mon, 07 Apr 2014 13:49:33 +0200
Message-ID: <534290CD.5040309@inria.fr>
To: alex.g.muir@gmail.com, public-sparql-dev@w3.org
Hi,

 >> return for example in this case a subject and subjects of it's children


prefix ex: <http://example.org>
select * where {
   ex:subject ?p ?o
   filter(isURI(?o))
}

 >> or even more complex a subject and all it's descendant

Using SPARQL 1.1 Property Path :

prefix ex: <http://example.org>
select * where {
   ex:subject (! ex:undef)* ?o
   filter(isURI(?o))
}

Olivier
Received on Monday, 7 April 2014 12:00:27 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:15:52 UTC