- From: Patrick Stickler <patrick.stickler@nokia.com>
- Date: Fri, 07 Nov 2003 09:07:11 +0200
- To: ext Dan Brickley <danbri@w3.org>, Bill de hÓra <dehora@eircom.net>
- Cc: <www-rdf-rules@w3.org>
On 2003-11-06 16:00, "Patrick Stickler" <patrick.stickler@nokia.com> wrote: > On 2003-11-05 20:18, "ext Dan Brickley" <danbri@w3.org> wrote: > >> ... Also this approach >> doesn't allow blanks for property names, since RDF/XML doesn't allow >> that. > > That is true, though I've yet to see a compelling query associated > with a real-world use case that does not specify a property. OK. I had a look at this limitation, and came up with the following way to address it in RDFQ [1]: (and while RDF doesn't provide explicitly for inference rules, I still consider the following solution "pure" RDF) -- @prefix ... @prefix rdfq: <http://sw.nokia.com/RDFQ-1/>. rdfq:property a rdf:Property; rdfs:comment "The super-property of all properties.". { ?p a rdf:Property . } log:implies { ?p rdfs:subPropertyOf rdfq:property . } -- Thus, [:target :property [:lt "10"^^xsd:integer]]. matches any resource that has any property with a value less than the integer value of ten. And [:target :property ex:blargh]. matches any resource that has any property with ex:blargh as its value. And, BTW, both are comparably compact forms of expression than an SQL like query language; e.g. SELECT ?s WHERE {?p, ?s, ?o} AND (?o < 10); SELECT ?s WHERE {?p, ?s, ex:blargh}; which illustrates the fact that query-by-example in RDF need not be verbose (as "in RDF" need not mean "in RDF/XML"). While RDF/XML support is manditory and default for RDFQ, where humans have to manually express queries (e.g. web forms, etc.) it seems fully acceptable to me to allow for more keyboard-friendly serializations of RDF, such as N3, as a server-specific value-added feature (just as N3 or NTriples support in APIs are value-added features, in addition to the manditory and default support for RDF/XML). And anyone who knows N3, should take to RDFQ in N3 like a duck to water. -- The above inference rule is then employed automatically by an RDFQ service in the resolution of queries. The rdfq:property property works similarly to rdfs:member. Just as every rdf:_# property is implicitly an rdfs:subPropertyOf rdfs:member (which would be impossible to define explicitly since the set of rdf:_# properties is infinite); likewise, every property that occurs in an RDF graph is (insofar as an RDFQ service is concerned) an rdfs:subPropertyOf rdfq:property. In fact, I was thinking that we perhaps could consider adding rdf:property to the core RDF vocabulary, to make such treatment standardized... ;-) -- So, even though the use cases for this are few and far between, and it probably won't see alot of milage, at least there are no longer any such limitations to using RDFQ -- though there may be other reasons for preferring an alternate form of query expression for particular tasks or in particular contexts. Cheers, Patrick [1] http://sw.nokia.com/rdfq/RDFQ.html
Received on Friday, 7 November 2003 02:19:41 UTC