Hi,
I really need an answer to this question. I am working on a project which uses XML to make pages, then XSLT to produce it to a web page. Here is a code sample:
public function transform ($xml) {
$proc = new XSLTProcessor;
$proc->importStyleSheet ($this->xsl);
$output = $proc->transformToXML ($xml);
return $output;
}
the $xml contains the web page in XML format, for example:
<?xml version="1.0" encoding="utf-8"?>
<page>
<meta>
<language>en</language>
<title>Main page</title>
<content>
<![CDATA[
lot's of content here along with <p>html</p>.
]]>
</content>
</page>
So, the web page is in XML and passed to the transform function, which loads an XSL file to transform the XML to a HTML web page. However, the above scripts will fail to load the content tag properly, because XSLT for some reason doesn't understand CDATA, and encodes the HTML to entities.
So, the question is, how can I output, using XSLT, the HTML as HTML without getting it encoded into entities?