Thanks all. Here's what I have now: [[ # List the undocumented FOAF properties used by some FOAF description PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX danbri: <http://danbri.org/foaf.rdf> SELECT DISTINCT ?p FROM <http://danbri.org/foaf.rdf> FROM NAMED foaf: WHERE { ?s ?p ?o . OPTIONAL { GRAPH foaf: { ?p rdf:type rdf:Property ; rdf:type ?type . } } FILTER ( ! bound(?type) ) FILTER REGEX( str(?p), "^http://xmlns.com/foaf/0.1/" ) # ignore 3rd-party namespaces } ]] Running it now, I get the following: ---------------------- | p | ====================== | foaf:wife | | foaf:pubkeyAddress | | foaf:dateOfBirth | | foaf:archnemesis | ---------------------- It doesn't feel 100% great having the namespace URI in a regex like that, ...but it does at least work perfectly :) So this little query lets me find out which properties I've used in my FOAF file but which don't really exist in the schema. Kinda handy :) Something quite similar should be able to check for fictional properties such as dc:author (instead of dc:creator). I guess to check all namespaces would need a bit of application code since we can't decide which graphs to load in mid-query (otherwise we could write a web crawler in sparql maybe?)... cheers, DanReceived on Wednesday, 10 May 2006 12:59:10 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:17:05 GMT