ID: 34103 Updated by: [EMAIL PROTECTED] Reported By: upstaked at yahoo dot com -Status: Open +Status: Assigned Bug Type: XSLT related -Operating System: Linux 32 +Operating System: * -PHP Version: 5.0.4 +PHP Version: 5CVS-2005-08-12 -Assigned To: +Assigned To: chregu New Comment:
Christian, check it out please. (I can reproduce too) Previous Comments: ------------------------------------------------------------------------ [2005-08-12 19:44:42] upstaked at yahoo dot com It doesn't work; it's not fixed in latest, as of this time. ------------------------------------------------------------------------ [2005-08-12 17:05:02] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip ------------------------------------------------------------------------ [2005-08-12 16:57:54] upstaked at yahoo dot com Description: ------------ The saxon:line-number() function existing in EXSLT returns 0. Reproduce code: --------------- <?php header('Content-type: text/plain'); $xmlStr = '<root> <node1/> <node2/> </root>'; $xslStr = <<<XSL <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://icl.com/saxon"> <xsl:output omit-xml-declaration="yes" method="text" /> <xsl:template match="*"> <xsl:for-each select="*"> Elem <xsl:value-of select="name()" />, line number <xsl:value-of select="saxon:line-number()" /> </xsl:for-each> </xsl:template> </xsl:stylesheet> XSL; $xsl = new XSLTProcessor(); $xsl->importStyleSheet(DOMDocument::loadXML($xslStr)); echo $xsl->transformToXML(DOMDocument::loadXML($xmlStr)); ?> Expected result: ---------------- Elem node1, line number 2 Elem node2, line number 3 Actual result: -------------- Elem node1, line number 0 Elem node2, line number 0 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34103&edit=1