Re: sparql for vocab management: theory vs practice

On Sun, Mar 26, 2006 at 10:38:47 -0500, Dan Brickley wrote:
> 
> >From a blog post I wrote yesterday, http://danbri.org/words/ 
> (where I'm having some connectivity and dns hosting woes, it seems)
> 
> There's a question buried in here: how do we ask SPARQL for the URIs
> of properties that appear in FOAF files yet aren't defined in the spec?
> 
> Suggestions welcomed :)

I think it can be done with something like:

PREFIX 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 DISTINCT ?p
WHERE {
    ?s ?p ?o
    OPTIONAL { GRAPH foaf: { ?p rdf:type ?prop }
               FILTER(?prop = rdfs:Property) }
    FILTER(REGEX(?p, "^http://xmlns.com/foaf/0.1/") && !BOUND(?prop))
}

However when I tried to test it SPARQLer told be it would allow dataset
building (when I tried to use FROM) and the rasqal demo gave a parse
error on the FOAF schema.

- Steve

Received on Sunday, 26 March 2006 16:16:14 UTC