W3C home > Mailing lists > Public > public-lod@w3.org > August 2009

Help with Musicbrainz

From: Terry Brooks <tabrooks@u.washington.edu>
Date: Mon, 24 Aug 2009 16:42:36 -0700
To: "'public-lod@w3.org'" <public-lod@w3.org>
Message-ID: <AAA761A2C05F5E4FAD4F0B6433BDD7110CA9758C0A@sdc-mbx-01.exchange.washington.edu>
I'm trying to build a query for Musicbrainz.

At the SPARQL explorer for Musicbrainz,   (http://dbtune.org/musicbrainz/snorql/  )this query works:

==== SNIP =========

?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: &lt;http://xmlns.com/foaf/0.1/&gt;  prefix rdf:  &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns

Encountered "&lt;" at line 1, column 57.
Was expecting:
    &lt;IRIref&gt; ...


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?


Terry Brooks
Information School
Suite 370, Mary Gates Hall
Box 352840
Seattle, WA 98195-2840
Received on Monday, 24 August 2009 23:43:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:20:51 UTC