xsl-list
[Top] [All Lists]

[xsl] Ampersand in CDATA

2007-08-31 16:38:08
Hi, I have the following XSL template using the PHP5 XSLT 1.0 processor:

<xsl:template match="/">
<![CDATA[ & ]]>
</xsl:template>

This is the PHP code I use to execute the transformation:

  // Load XSL file
  $xsl_dom = new DOMDocument();
  $xsl_dom->load($xsl_filename);

  // Apply XSL
  $xsl = new XSLTProcessor();
  $xsl->importStyleSheet($xsl_dom);
  echo $xsl->transformToXML($xml_dom);

I expect it to output just an ampersand by itself, but instead, I'm
getting "&amp;". What's going on?

-Geoffrey Lee

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>