View Single Post
  #2 (permalink)  
Old September 14th, 2005, 01:27 PM
mhkay's Avatar
mhkay mhkay is offline
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Actually, the value of the node does not have any angle brackets in it, so there are none to escape. You need to serialize the node, and then escape its serialization. With a saxon extension function you can do


<xsl:output method="xml"/>

<xsl:value-of select="saxon:serialize($node)"/>

I can't immediately think of any other solution, at least not within XSLT. It's more common for people to want to remove one level of escaping than to add one: which can be achieved using disable-output-escaping.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote