Enumerate nested statements

http://danbri.org/foaf.rdf has the following nested info:

  <knows>

      <Person>

        <name>Aaron Swartz</name>

        <made>

          <rss:channel rdf:about="http://www.blogspace.com/rss/rss10">

            <rss:title>RSS Info</rss:title>

            <rdfs:seeAlso
rdf:resource="http://www.blogspace.com/rss/rss10"/>

          </rss:channel>

        </made>

        <rdfs:seeAlso rdf:resource="http://www.aaronsw.com/about.xrdf"/>

      </Person>

    </knows>

 

http://sparql.org/sparql.html  executed the following SPARQL:

REFIX rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 

PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#> 

PREFIX foaf:   <http://xmlns.com/foaf/0.1/>

 

SELECT * 

  WHERE 

  { 

     <http://danbri.org/foaf.rdf#danbri> foaf:knows ?known .  

    ?known ?predicate ?object .

  }

 

It produced the first level info. For example,

               ?known = _:b19

             ?predicate = <http://xmlns.com/foaf/0.1/made>

             ?object = <http://www.blogspace.com/rss/rss10>

 

Based on the above info, I could then get the next level info by the
following SPARQL: "SELECT *  WHERE { <http://www.blogspace.com/rss/rss10>
?predicate ?object .}".

 

How to write a single SPARQL so I could retrieve the nested level info even
it has 10 levels deep?

 

Thanks in advance for your help.

 

Best,

-- On Lee

 

Received on Tuesday, 18 August 2009 22:33:11 UTC