Re: [Tracker] rdfq and encoding
- From: Jamie McCracken <jamiemcc blueyonder co uk>
- To: Fabien VALLON <fabien sonappart net>
- Cc: Tracker List <tracker-list gnome org>
- Subject: Re: [Tracker] rdfq and encoding
- Date: Tue, 19 Sep 2006 14:01:02 +0100
Fabien VALLON wrote:
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 &
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
You missed the point - you cant parse it on the server or client if its
invalid xml!
What you must do is check if any value you want to use has illegal
embedded chars and escape them *before* you construct the xml.
You would have to do this with any xml you generate for any program (and
not just tracker)
--
Mr Jamie McCracken
http://jamiemcc.livejournal.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]