ID:               34103
 Updated by:       [EMAIL PROTECTED]
 Reported By:      upstaked at yahoo dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         XSLT related
 Operating System: Linux 32
 PHP Version:      5.0.4
 New Comment:

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




Previous Comments:
------------------------------------------------------------------------

[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

Reply via email to