XSL module ignores disable-output-escaping attribute

General discussion for the Zend Server CE

XSL module ignores disable-output-escaping attribute

Postby erzwormser on Thu Apr 16, 2009 9:31 am

I installed Zend Server at my linux host. Currently i have the problem that the XSLT ignores the attribute "disable-output-escaping".

Here my example code

PHP-File:
Code: Select all
$xsl = new DOMDocument();
$xsl->load('test.xsl');

$xslProcessor = new XSLTProcessor();
$xslProcessor->importStylesheet($xsl);

$xml = new DOMDocument();
$xml->load('test.xml');

$doc = new DomDocument();
$doc = $xslProcessor->transformToDoc($xml);
echo $doc->saveXML();


File: text.xml
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<root>
   <foo value="&lt;h1&gt;bar&lt;/h1&gt;" />
</root>


File: text.xsl
Code: Select all
<xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>

<xsl:template match="foo">
   foo:
   <span><xsl:value-of select="@value" disable-output-escaping='yes' /></span>
</xsl:template>

<xsl:template match="/">
   <html>
   <body>
      <xsl:apply-templates select="//foo" />
   </body>
   </html>
</xsl:template>

</xsl:stylesheet>
erzwormser
 
Posts: 2
Joined: Thu Apr 16, 2009 8:21 am

Re: XSL module ignores disable-output-escaping attribute

Postby erzwormser on Thu Apr 16, 2009 10:02 am

Here the details about my system:

OS: Ubuntu Intrepid Linux
Kernel: 2.6.27-11-generic #1 SMP Thu Jan 29 19:28:32 UTC 2009 x86_64 GNU/Linux

Zend Server was installed via deb repository.
erzwormser
 
Posts: 2
Joined: Thu Apr 16, 2009 8:21 am

Re: XSL module ignores disable-output-escaping attribute

Postby fordiy2010 on Thu Dec 15, 2011 1:43 am

how did you solve it?
I encountered the same problem...
fordiy2010
 
Posts: 6
Joined: Thu Nov 10, 2011 7:14 am


Return to Zend Server Community Edition

Who is online

Users browsing this forum: No registered users and 0 guests