Re: [Tracker] rdfq and encoding



Jamie McCracken a écrit :
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.
You mean it is on the app side to parse before sending the request ?
I was hoping that it would be done on the server side


Fabien



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