ID: 36416 Updated by: [EMAIL PROTECTED] Reported By: fidanza at uniroma3 dot it -Status: Feedback +Status: Bogus Bug Type: XSLT related Operating System: Windows Server 2003 PHP Version: 5.1.2 New Comment:
Not a php issue, but a libxslt "issue". xsltproc brings the same error, but variables in matchers are not allowed according to the specs, anyway. See http://www.w3.org/TR/xslt#section-Defining-Template-Rules: "It is an error for the value of the match attribute to contain a VariableReference" Previous Comments: ------------------------------------------------------------------------ [2006-02-16 13:09:49] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2006-02-16 13:03:46] fidanza at uniroma3 dot it Description: ------------ A simple xslt stylesheet used on a production website with php 5.0.4 doesn't work more since we installed php 5.1.2.รน Reproduce code: --------------- PHP code: public function loadXslFile(filewrapper $xslFile) { $this->xslDom->load( $xslFile->getFileName() ); $this->xslProcessor->importStylesheet( $this->xslDom ); } XSLT file: <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="ISO-8859-1" indent="yes" omit-xml-declaration="yes" /> <xsl:strip-space elements="*" /> <xsl:param name="current"/> <xsl:template match="[EMAIL PROTECTED]"> <xsl:if test="not(@id='home')"> :: <xsl:value-of select="@title" /> </xsl:if> </xsl:template> </xsl:stylesheet> Expected result: ---------------- The XSLT is expected to return the title attribute of a node element which id matches 'current' param value. Actual result: -------------- We obtain the message: XSLTProcessor::importStylesheet() [function.importStylesheet]: Undefined variable Trying to extend the scope of xsl:param to enclose the whole template will result in: XSLTProcessor::importStylesheet() [function.importStylesheet]: compilation error: file D:/InetPub/wwwroot/www.uniroma3.it/xml/pagetitle.xsl line 6 element template ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36416&edit=1
