Re: [xslt] double-encoding XSL parameters in Python



On Fri, Jun 18, 2004 at 03:19:43PM +0100, Matthew Patterson wrote:
> Hello,
> 
> I've got an annoying problem using 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 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.
> 
> Is there any way I can avoid this?

  use """this is a " string""" at the python level and don't escape.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/


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