[XML-SIG] double-encoding XSL parameters in Python with libxslt

Matthew Patterson list-matt at reprocessed.org
Fri Jun 18 10:24:42 EDT 2004


Hello,

I've got an annoying problem using Gnome libxslt's Python bindings.

I'm passing in a global parameter (a string), which needs to be 
enclosed in quotes. I can't guarantee that the string won't contain 
more quotes, so to ensure that I don't terminate my quoted-string 
parameter early I'm encoding any single quotes as ' before I pass 
in the string.

libxslt is encoding my already encoded string again, so 'hello here's a 
parameter' gets encoded to 'hello here's a parameter' by me, and 
then to 'hello here's a parameter' by libxslt.

If I just pass in 'hello here's a parameter' then libxslt complains 
about terminating the string early...

Is there any way I can avoid this?

Thanks,

Matt

-- 
   Matt Patterson | Design & Code
   <matt at emdash co uk> | http://www.emdash.co.uk/
   <matt at reprocessed org> | http://www.reprocessed.org/




More information about the XML-SIG mailing list