ajs6f kirjoitti 25.02.2018 klo 23:46:
If you are not concerned about performance, why not add those prefixes
client-side?
Some client-side libraries do this.
With EasyRdf (for PHP), you declare your prefixes once, and the library
knows about the common ones so you don't have to declare RDFS, OWL etc.
Then you write your SPARQL queries using qnames and EasyRdf prepends
PREFIX declarations transparently at query time (and only the ones you
actually used in the particular query).
YASGUI is a bit similar, when you use an unknown prefix it will try to
look it up from prefix.cc and add the PREFIX declaration if it finds one.
It's too bad SPARQLWrapper (for Python) doesn't do this, there you have
to declare PREFIXes for each query. Of course it's fairly trivial to
make a wrapper that takes care of adding prefixes to a query.
Like others in this thread have argued, I think it makes sense to do
prefix handling on the client side and keep the SPARQL protocol "simple
but stupid". Then everything needed to answer a query (well, except for
the RDF data set of course) will be contained in the HTTP request.
-Osma
--
Osma Suominen
D.Sc. (Tech), Information Systems Specialist
National Library of Finland
P.O. Box 26 (Kaikukatu 4)
00014 HELSINGIN YLIOPISTO
Tel. +358 50 3199529
[email protected]
http://www.nationallibrary.fi