-
Type:
Bug
-
Status: Resolved
-
Resolution: Incomplete
-
Affects Version/s: 1.3.x
-
Fix Version/s: None
-
Component/s: XPathC
-
Labels:None
-
Environment:Operating System: Linux
Platform: PC
-
Bugzilla Id:8322
The position and last function don't return the right information for the child
of the root node. I test with this xml
<?xml version="1.0"?>
<root>
<nodo name="A">
<descr>A</desc>
</nodo>
<nodo name="B">
<descr>B</descr>
<nodo name="C">
<descr>C</descr>
</nodo>
</root>
The xsl file I use is:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="root">
<html>
<body>
<xsl:apply-templates/>
</body>
</html>
<xsl:template match="nodo">
<b><xsl:value-of select="position()"/>--<xsl:value-of select="last()"/>--
<xsl:value-of select="./descr"/></b><br/>
<xsl:apply-templates select="./nodo"/>
</xsl:template>
</xsl:stylesheet>
When you run the XalanTransform with this files as input and you see the html
output you will see that:
1. the last node is indicated as node 7
2. the three nodes have position 2/4/6
The right results should be:
1. last node 3
2. the three nodes with position 1/2/3
For all other level of child nodes this two functions work well.
I'm trying to write a patch but unfortunatelly I'm very busy with my job. It's
sure that if I write a patch i'll send to you.
Thanks in advance
Christian Fontana