Re: [Tracker] rdfq and encoding



Fabien VALLON wrote:
Hi,

It seems that there is problem with encoding when I query a

<rdfq:Condition>
  <rdfq:and>
  <rdfq:inSet>
    <rdfq:Property name="File.Format" />
    <rdf:String>audio/wav,audio/x-vorbis+ogg,audio/x-mp3</rdf:String>
  </rdfq:inSet>
  <rdfq:inSet>
    <rdfq:Property name="Audio.Album" />
    <rdf:String>Porgy and Bess</rdf:String>
  </rdfq:inSet>
  </rdfq:and>
</rdfq:Condition>

works  but

<rdfq:Condition>
  <rdfq:and>
  <rdfq:inSet>
    <rdfq:Property name="File.Format" />
    <rdf:String>audio/wav,audio/x-vorbis+ogg,audio/x-mp3</rdf:String>
  </rdfq:inSet>
  <rdfq:inSet>
    <rdfq:Property name="Audio.Album" />
    <rdf:String>Albert Collins & Barrelhouse Live</rdf:String>
  </rdfq:inSet>
  </rdfq:and>
</rdfq:Condition>

complains about :
Error in rdf query parse: Error on line 9: Character ' ' is not valid at the start of an entity name; the & character begins an entity; if this ampersand isn't supposed to be an entity, escape it as &amp;

Should the trackerd rdfq parser do the job right ?

no we use an xmp parser so the xml needs to be well formed which means inline ampersands '&', '<' and '>' need to be escaped by you using the correct xml escape characters.

Also use should only use inSet with a comma seperated list of values to match against. For a single match just use "<rdfq:equals>" instead for the Audio.Album part

hope that helps


--
Mr Jamie McCracken
http://jamiemcc.livejournal.com/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]