[Premise: Bugzilla seems to be down someway, because I have asked for a new
account but I have not received my password yet. So, excuse me for this
"hand-made" bug report.]
I have found a big bug in Xalan-J-2-2-D11 regarding the semantic of
last() inside a for-each guard.
In attachment you can find an (almost) minimal stylesheet and an almost
minimal xml file showing the problem.
Regards,
C.S.C.
--
----------------------------------------------------------------
Real name: Claudio Sacerdoti Coen
PhD Student in Computer Science at University of Bologna
E-mail: [EMAIL PROTECTED]
http://caristudenti.cs.unibo.it/~sacerdot
----------------------------------------------------------------
<?xml version="1.0"?>
<root>
<a>one</a>
<a>two</a>
<a>three</a>
<a>four</a>
</root>
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="root">
<html>
<xsl:variable name="last" select="count(*)"/>
<!-- Comment either the following line...
<xsl:for-each select="*[$last > position()]">
-->
<!-- ... or the next one. The semantic should be the same. -->
<xsl:for-each select="*[last() > position()]">
<h1><xsl:value-of select="."/></h1>
</xsl:for-each>
</html>
</xsl:template>
</xsl:stylesheet>