Disabled Escaping Example

Figure 24. disable-escaping.xml

This document is <copyright>No One In Particular</copyright>.

Figure 25. disable-escaping.xsl

<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

<xsl:output method="xml"/>

<xsl:template match="doc">

<xsl:template match="copyright">
  <xsl:text>Copyright </xsl:text>
  <xsl:text disable-output-escaping="yes">&amp;copy;</xsl:text>
  <xsl:text> 1999 </xsl:text>


Figure 26. disable-escaping.html

<?xml version="1.0" encoding="utf-8"?>
This document is Copyright &copy; 1999 No One In Particular.

A better technique for this particular example would be simply to use the numeric character reference for the Copyright symbol (&#xA9;) and allow the serializer to "do the right thing."