ID: 30218
Comment by: chabotc at xs4all dot nl
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:
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..
Previous Comments:
------------------------------------------------------------------------
[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>
-----------------------------
------------------------------------------------------------------------
[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
---------------
------------------------------------------------------------------------
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