> I have an XML DOM in memory (using Xerces) I am transforming, and in some > cases I set an Element value to reserved chars (&, <, >, etc.). When I do the > transformation, these characters get transformed into entities, such as: & > >
Some characters -- mostly & and < -- _MUST_ be escaped when generating XML or HTML output, or the resulting document will not be well-formed. The normal behavior is to escape them character by character. An alternative would be to use <xsl:output>'s cdata-section-elements feature to tell the system that, for certain output elements, you'd prefer to use block-escaping with <![CDATA[]]>. If your intent is not to generate HTML or XML, another alternative is to use <xsl:output> to specify method="text". This will output raw character data. The downside is that this means your stylesheet takes _all_ responsibility for any formatting of that data.
