jean-baptiste (8) [Avatar] Offline
#1
Hello,
Is there a simple way to try the SPARQL queries of chapter five on our computer ? Do they require to be connected as should be for queries on a SQL server ? I candidely tried the query of listing 5.1 on http://dbpedia.org/sparql, but the following error was displayed :

Virtuoso 37000 Error SP030: SPARQL compiler, line 3: Missing <namespace-iri-string> in PREFIX declaration at 'http:' before '/'

Thanks,
david.wood (45) [Avatar] Offline
#2
Re: How to execute the SPARQL examples of chapter 5 ?
Hi Jean-Baptiste,

Yes, the SPARQL queries have been tested and perform on the test data provided. You will need to read more into the chapter to see how that is done. Section 5.2 introduces you to the arq query processor from the Jena project and shows you how to use it to run the sample queries from the command line. Later examples show you how to use other tools (especially the small Fuseki RDF database and Callimachus) to query the data with SPARQL.

You won't be able to execute listing 5.1 using DBpedia's SPARQL endpoint because you found a bug! The first line:
[[
prefix foaf: http://xmlns.com/foaf/0.1/
]]
should be changed to this:
prefix foaf: <http://xmlns.com/foaf/0.1/>
]]

Thanks for finding that problem. The fix should make it into the next MEAP update.

Regards,
Dave
jean-baptiste (8) [Avatar] Offline
#3
Re: How to execute the SPARQL examples of chapter 5 ?
Hello,
I found strange that the query did not retrieve any results on http://dbpedia.org/sparql even with the brakets over <http://xmlns.com/foaf/0.1/>, but security restrictions of this server do not allow to retrieve remote RDF data...

Message was edited by:
jean-baptiste

Message was edited by:
jean-baptiste

Message was edited by:
jean-baptiste
jean-baptiste (8) [Avatar] Offline
#4
Re: How to execute the SPARQL examples of chapter 5 ?
Hello,
I had some difficulties to install ARQ on Windows since I couldn't find it on the URL incubator.apache.org/jena, given in chapter 5.2.1 (notice that this URL is redirected to http://jena.apache.org/).

I finaly found ARQ for download more easily on Sourceforge : http://sourceforge.net/projects/jena/files/ARQ/.

What is more, there should be an error in the listing 5.4 command line, since the arq.bat file is on the /bat directory, not /bin.

In the example given in listing 5.3, PAR is installed in the c:MyProjectsARQ directory. Would not be more logical to execute the following command in listing 5.4 :

c:MyProjectsARQatarq --query foaf.rq --data foaf.rdf
david.wood (45) [Avatar] Offline
#5
Re: How to execute the SPARQL examples of chapter 5 ?
Hi Jean-Baptiste,

Why do you find it strange that the DBpedia SPARQL endpoint will not process queries for third-party sites? Although the SPARQL language allows that sort of query, security restrictions generally prohibit its general implementation over the public Internet.

I will revisit Chapter 5 to make sure that is more clear. Thanks for bringing it to our attention.

Someone else already reported the missing angle brackets in the FOAF URL and we have repaired the listing. That should be in the next MEAP update. Thanks for noting it.

Regards,
Dave
david.wood (45) [Avatar] Offline
#6
Re: How to execute the SPARQL examples of chapter 5 ?
Hi Jean-Baptiste,

Wow - thanks very much for sticking with this. We appreciate your diligence.

You are correct that Jena has been promoted to a full Apache project. We have corrected its URL to be http://jena.apache.org, but it has not made it to the MEAP PDF yet. We did *not* notice that it was hard to find ARQ from that site, but you are correct that it is. I will change the chapter to incude the Sourceforge link directly. Thanks for catching that.

Windows and Unix-like OS paths are different. I think we say somewhere that our example paths are Unix-like (mostly for Linux and Mac users), but I'll check to be sure that is the case. We opted not to provide duplicate listings for Windows users in an attempt at brevity. Sorry if you found that confusing. We'll try to make it more clear.

Regards,
Dave