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

Re: Help with Musicbrainz

From: Richard Cyganiak <richard@cyganiak.de>
Date: Tue, 25 Aug 2009 11:40:28 +0100
Cc: "'public-lod@w3.org'" <public-lod@w3.org>
Message-Id: <1AEEDCED-C443-4E78-9527-358A68B0412A@cyganiak.de>
To: Terry Brooks <tabrooks@u.washington.edu>
Terry,

How exactly are you submitting your HTTP request? What did you do in  
order to obtain the error message? I get the same message when I  
remove the closing angle bracket on the rdf: namespace URI, or when I  
insert whitespace anywhere in that URI. Did any of these things happen  
by chance?

(Kurt: It's probably not a problem with escaping the brackets, the  
"&lt;" bit is just because the web server tries to respond with an  
error message in HTML, and therefore the web server escapes the  
brackets in the error message. This doesn't mean they were encoded in  
the request.)

Best,
Richard


On 25 Aug 2009, at 00:42, Terry Brooks wrote:

> 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: &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; ...
>    </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
>
>
>
>
Received on Tuesday, 25 August 2009 10:41:12 UTC

This archive was generated by hypermail 2.3.1 : Sunday, 31 March 2013 14:24:23 UTC