I'm trying to build a query for Musicbrainz.
At the SPARQL explorer for Musicbrainz,
(http://dbtune.org/musicbrainz/snorql/ )this query works:
==== SNIP =========
SELECT ?type WHERE {
?name foaf:name 'Screwtape' . ?name rdf:type ?type .
}
=============
but when I try an HTTP request to the SPARQL endpoint
("http://dbtune.org/musicbrainz/sparql";) with the following query, I must
include PREFIX:
"prefix foaf: <http://xmlns.com/foaf/0.1/> prefix rdf:
<http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT ?type WHERE { ?name
foaf:name 'Screwtape' . ?name rdf:type ?type }";
and I get a parsing error that seems to indicate some parsing problem with the
angle brackets:
====== SNIP ============
<title>Error 400 Parse error:
prefix foaf: <http://xmlns.com/foaf/0.1/> prefix rdf:
<http://www.w3.org/1999/02/22-rdf-syntax-ns
Encountered "<" at line 1, column 57.
Was expecting:
<IRIref> ...
</title>
</head>
===============
Does someone have a working example of an HTTP request to the SPARQL endpoint
to Musicbrainz that includes more than one PREFIX that finesses the angle
brackets problem?
Thanks,
Terry Brooks
Information School
Suite 370, Mary Gates Hall
Box 352840
Seattle, WA 98195-2840