#34103 [NEW]: saxon:line-number() returns 0
| From: | upstaked at yahoo dot com | Date: | Fri, 12 Aug 2005 14:57:55 +0000 |
| Subject: | #34103 [NEW]: saxon:line-number() returns 0 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-83453@lists.php.net to get a copy of this message | ||
From: upstaked at yahoo dot com
Operating system: Linux 32
PHP version: 5.0.4
PHP Bug Type: XSLT related
Bug description: saxon:line-number() returns 0
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 bug report at http://bugs.php.net/?id=34103&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34103&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34103&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34103&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34103&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34103&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34103&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34103&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34103&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34103&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34103&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=34103&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=34103&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34103&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34103&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34103&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34103&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34103&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34103&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34103&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34103&r=mysqlcfg