Subject: RE: [xsl] Is there a way to utilise disable-output-escaping in apply-templates? From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Wed, 13 Sep 2006 18:32:35 +0100 |
There is a way: <xsl:template match="text()"> <xsl:value-of select="." disable-output-escaping="yes"/> </xsl:template> But I doubt very much that it is the right design. d-o-e is nearly always the wrong thing to do, and it certainly seems the wrong thing here. You don't want to disable escaping of "<" and "&", you want to enable escaping of quotes and apostrophes, as far as I can see. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: Karl [mailto:call14@xxxxxxxxx] > Sent: 13 September 2006 18:10 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] Is there a way to utilise > disable-output-escaping in apply-templates? > > In my xslt, i use apply-templates instead of value-of select > at quite a few places and everything is working fine. > Basically, my xslt's html output is been stored into a > database something like > > field x = ...<p>contents with quote's & "s too</p>..and some > other tags + contents > > different fields store different section of html code and > finally another environment assemble them to deliver the final output. > > However, now we realised that storing of the html output > fails in some fields when encountering speacial chars like ", > ' etc [we still explore why it fails only in few places]. > > As a quick solution, we want to use > disable-output-escaping="no" in xslt, thinking that will make > field x = ...<p>contents with quote&#xxx;s & &#xxx;s too</p>.. > [xxx - relevant values] which might allow us to store the > data without fail. But the trouble is we cannot use with > disable-output-escaping with apply-templates. Is there a way around? > > Thanks, > karl > > > > ___________________________________________________________ > Copy addresses and emails from any email account to Yahoo! > Mail - quick, easy and free. http://uk.docs.yahoo.com/trueswitch2.html
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Is there a way to utilise dis, Karl | Thread | [xsl] Is there a way to utilise dis, Karl |
[xsl] Is there a way to utilise dis, Karl | Date | [xsl] Bibliography References, siarom egrub |
Month |