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

Re: Descendants

From: Markus Kroetzsch <markus.kroetzsch@tu-dresden.de>
Date: Mon, 07 Apr 2014 14:05:44 +0200
Message-ID: <53429498.2020205@tu-dresden.de>
To: Alex Muir <alex.g.muir@gmail.com>, public-sparql-dev@w3.org
Hi Alex,

You can use SPARQL 1.1 *property paths* for getting all descendants of a 
node. Examples should be findable online, for example in the W3C 
documents on SPARQL 1.1.

Regards,

Markus

On 07/04/14 12:37, Alex Muir wrote:
> Hi,
>
> I've recently set up jena and imported an rdf file which is exported
> from Semantic Media Wiki. I've been reading through SPARQL tutorials
> and searching online but I haven't come across much in the way of
> example queries that are used to return for example in this case a
> subject and subjects of it's children or even more complex a subject
> and all it's descendant subjects which thus far I feel from what I've
> read is not possible. Is that the case?
>
> Can you point me to any resources that would help me understand how to
> build such queries?
>
> Here is a snippet of the rdf input.
>
> Multiple  property:ChildElement can exist within each subject.
>
> <swivt:Subject rdf:about="http://elt.kode1100.com/wiki/index.php/Special:URIResolver/ELT-3ALevel.doors">
>          <rdf:type rdf:resource="&wiki;Category-3AElements"/>
>          <rdfs:label>ELT:Level.doors</rdfs:label>
>          <swivt:page
> rdf:resource="http://elt.kode1100.com/wiki/index.php/ELT:Level.doors"/>
>          <rdfs:isDefinedBy
> rdf:resource="http://elt.kode1100.com/wiki/index.php/Special:ExportRDF/ELT:Level.doors"/>
>          <swivt:wikiNamespace
> rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">4</swivt:wikiNamespace>
>          <property:ChildElement rdf:resource="&wiki;ELT-3AQuestion.doors"/
>
>
> Regards
>

-- 
Markus Kroetzsch
Faculty of Computer Science
Technische Universitšt Dresden
+49 351 463 38486
http://korrekt.org/
Received on Monday, 7 April 2014 12:06:14 UTC

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