ID: 30218 User updated by: robert dot dahlin at jerntorget dot se Reported By: robert dot dahlin at jerntorget dot se -Status: Feedback +Status: Open Bug Type: XSLT related Operating System: Linux Slackware 2.6 PHP Version: 5.0.1 New Comment:
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> ----------------------------- Previous Comments: ------------------------------------------------------------------------ [2004-09-24 14:24:36] [EMAIL PROTECTED] Can you please provide a full XSLT and XML example and did you declare the entity? ------------------------------------------------------------------------ [2004-09-24 13:13:45] robert dot dahlin at jerntorget dot se Version info from phpifo() just in case. Zend Engine v2.0.1 Zend Extension Manager v1.0.2 --------------- xml XML Support active XML Namespace Support active libxml2 Version 2.5.11 --------------- xsl XSL enabled libxslt Version 1.0.33 libxslt compiled against libxml Version 2.5.11 EXSLT enabled libexslt Version 1.0.33 --------------- ------------------------------------------------------------------------ [2004-09-24 13:10:08] robert dot dahlin at jerntorget dot se Description: ------------ xsltApplyOneTemplate is always shown if i have an followed by for example <xsl:if test="object"> in an xsl file. xsltApplyOneTemplate: if was not compiled in (if can for example be apply-template or some other method), i've found that the problem seems to be an directly before the <xsl:if> or what ever "method" is causing the problem. One way to get thru the problem is to use span tags around like : <span> </span> but I don't think that it should be nessesary to do that. Reproduce code: --------------- <td> <xsl:apply-templates select="object"/></td> Expected result: ---------------- <td>(the value of object in xml)</td> Actual result: -------------- Warning: xsltApplyOneTemplate: if was not compiled in /www/include/xslttest.php on line 19 <td>(the value of object in xml)</td> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30218&edit=1