Scott Penrose


Scott is an expert software developer with over 30 years experience, specialising in education, automation and remote data.

Diving into the deep end of SPARQL. Learning lots, having fun, but also having issues.



A simple query like this:

SELECT ?s ?p ?o
{ ?s ?p ?o

Won't work on my Virtuoso server, so I use:

SELECT ?s ?p ?o
FROM <http://the/data/URI>
{ ?s ?p ?o

Yet adding a FROM on the original source gets me no data.


I seem to have lots of problems with format.

  • Specifying format seems to be different on each server, text/xml vs application/xml.
  • The format returned for XML is sometimes SPARQL XML and sometimes RDF

What I think is worse, is the Content-type returned is not always right. Sometimes it returns a useful entry like "application/xml+sparql" and other times it returns text/plain. Unfortunately the parser I am using uses the content-type to decide which parser to use, and it is never working unless I hack it.

Connection String


Why is it that people are inventing new libraries to deal with this data. I am sure the answer is that I don't know what I am talking about... but let me assume my ignorance could be useful. How about a standard DBI (Perl) or similar source for other languages. The nice thing is that these database drivers (DBD in Perl DBI terms) is that they accept strings as their query, so if their query is SPARQL, that doesn't change the interface. But it does give you then a standard interface, including how to retrieve the next value, how to encode strings etc etc.

Bind parameters

How do we use bind parameters. These are the core of inserting unsafe data into a query. It is the normal way you would add any data provided to a query. WHERE x = ?, or even x NOT LIKE ?. There seems to be some work on this in SPARQL 1.1, and some non standard extensions.

  • RDF