ID: 30218 Comment by: php at 6bitt dot com Reported By: robert dot dahlin at jerntorget dot se Status: No Feedback Bug Type: XSLT related Operating System: Linux Slackware 2.6 PHP Version: 5.0.1 New Comment:
I'm experiencing the same thing with this in my XSL: —<xsl:apply-templates select="ssp:attributed/node()"/> Using: PHP 5.1.2 Zend Engine v2.1.0 PHP API 20041225 PHP Extension 20050922 Zend Extension 220051025 -- xml XML Support active XML Namespace Support active libxml2 Version 2.6.23 -- xsl XSL enabled libxslt Version 1.1.15 libxslt compiled against libxml Version 2.6.23 EXSLT enabled libexslt Version 1.1.15 Previous Comments: ------------------------------------------------------------------------ [2006-03-20 10:06:06] ross at golder dot org Same here, PHP 5.0.5-2ubuntu1.2 (cli). Simple test case: <?php $xsl = "<?xml version=\"1.0\"?> <!DOCTYPE xsl:stylesheet [<!ENTITY whatever \"£\">]> <xsl:stylesheet version=\"1.1\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"> <xsl:template match=\"test\"> <p>&whatever;<xsl:value-of select=\".\"/></p> <p>&whatever;<xsl:apply-templates/></p> <p>&whatever;No problem</p> </xsl:template> </xsl:stylesheet> "; $xml = "<?xml version=\"1.0\"?> <test>Something</test> "; $xmldom = DOMDocument::loadXML($xml); $xsldom = DOMDocument::loadXML($xsl); $xsltproc = new XSLTProcessor(); $xsltproc->importStylesheet($xsldom); echo $xsltproc->transformToXML($xmldom); ?> ------------------------------------------------------------------------ [2005-09-15 10:35:38] chabotc at xs4all dot nl We have the same problem here. The problem happens when a NBSP is situated before a <xsl:if> statement. Also in the output, even if you enclose the with a <span></span>, there's no 's or spaces.. We've tried defining <!ENTITY nbsp " "> (or #160) but to no avail, we get the same "xsltApplyOneTemplate: if was not compiled in" error. This is with libxml2-2.6.22, libxslt-1.1.15-1 and php-5.0.4 on a fully up to date RedHat Enterprise Server 4. >From phpinfo: Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies with Zend Extension Manager v1.0.8, Copyright (c) 2003-2005, by Zend Technologies with Zend Optimizer v2.5.8, Copyright (c) 1998-2004, by Zend Technologies with Zend Debugger v4.0.0, Copyright (c) 1999-2005, by Zend Technologies libXML support active libXML Version 2.6.22 libXML streams enabled XSL enabled libxslt Version 1.1.15 libxslt compiled against libxml Version 2.6.22 EXSLT enabled libexslt Version 1.1.15 This does pose quite a problem to us for our upgrade path to php5, we used sablotron's xslt under php4 for our products, and ofcourse the html templates do contain quite a few  's.. ------------------------------------------------------------------------ [2004-10-07 01:00:02] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2004-09-29 18:03:02] [EMAIL PROTECTED] Currently can't reproduce that, can you please upgrade to a recent libxml2/libxslt version and see if the problem persists? ------------------------------------------------------------------------ [2004-09-28 11:06:47] robert dot dahlin at jerntorget dot se XML and XSL example. ---------------------------- The same thing happens when i use for example » but if <span>»</span> it does not appear either. If i wan't it to be visible i have to use "»" instead, but that's not OK. Here is an example that does not work for me, I just get the following warnings. Warning: xsltApplyOneTemplate: apply-templates was not compiled in xsltest.php on line 20 Warning: xsltApplyOneTemplate: apply-templates was not compiled in xsltest.php on line 20 //Robert Dahlin ----------------------------------------------------------------------- XML: ----------------------------- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"[ <!ENTITY nbsp " ">]> <document> <data> <sessid></sessid> <oid></oid> <object type="html" id="12345" pageOID="4"><![CDATA[TESTSTRING]]></object> </data> </document> ----------------------------- XSL: ----------------------------- <!DOCTYPE wasp [ <!ENTITY lt "&#60;"> <!ENTITY gt ">"> <!ENTITY amp "&#38;"> <!ENTITY apos "'"> <!ENTITY quot """> <!ENTITY nbsp " "> <!ENTITY raquo "»"> <!ENTITY deg "°"> <!ENTITY space " "> ]> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:include href='/www/xsl-includes/menu.xsl'/> <xsl:template match="/"> <xsl:apply-templates select="document"/> </xsl:template> <xsl:template match="document"> <html> <xsl:apply-templates select="data"/> </html> </xsl:template> <xsl:template match="data"> <body bgcolor="#FFFFFF" marginwidth="" topmargin="" marginheight="" leftmargin="" > <table border="0" background="" width="100%" cellspacing="0" cellpadding="0"> <tr><td style="">»<xsl:apply-templates select="object"/></td></tr> <tr><td style=""> <xsl:apply-templates select="object"/></td></tr> </table> </body> </xsl:template> </xsl:stylesheet> ----------------------------- ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/30218 -- Edit this bug report at http://bugs.php.net/?id=30218&edit=1