[plug] XSL question

Shayne O'Neill shayneo at bestflights.com.au
Wed Oct 25 11:56:21 WST 2006


Ah ha. Yup That does it

<xsl:value-of disable-output-escaping="yes" select="content"/>

It's a bit counter intuitive that it works, but it actually does work. 

-----Original Message-----
From: plug-bounces at plug.org.au [mailto:plug-bounces at plug.org.au] On
Behalf Of Kirk Turner
Sent: Wednesday, 25 October 2006 11:52 AM
To: plug at plug.org.au
Subject: Re: [plug] XSL question

> Does anyone know enough about xsl transformations to know if theres a 
> tag that says "decode this stuff back into html so the browser can 
> display it properly"?
Its been a while since I've played with xml/xslt but you can disable the
output escaping that occurs. Have a look at:

http://www.w3schools.com/xsl/el_value-of.asp

I have a nasty feeling that this actually covers the reverse scenario
(ie you have < and > in your xml and you want it to be put in as is and
not be escaped so it becomes html tags), but I don't have any of the
code that I've done similar things with in the past.

The key is to find out where the conversion is being done - is it in the
sql2xml library, or is it the xml/xsl parser doing it. If it is the
later the example above should work.

Kirk

PS if you haven't looked at w3schools.com before I find it a really
useful resource for xml/xsl stuff in general.
_______________________________________________
PLUG discussion list: plug at plug.org.au
http://www.plug.org.au/mailman/listinfo/plug
Committee e-mail: committee at plug.linux.org.au



More information about the plug mailing list