DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20913>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20913 last() function does not work correctly within a for-each select="a|b" structure. Summary: last() function does not work correctly within a for- each select="a|b" structure. Product: XalanJ2 Version: 2.5 Platform: All OS/Version: Windows XP Status: NEW Severity: Normal Priority: Other Component: org.apache.xalan.xsltc AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] last() seems to select the last node. It believe it should return the number of selected nodes. It does work within for-each select="a". Xalan interpreted works fine too. I used the following test case: XSL: <?xml version='1.0' encoding='UTF-8' ?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output encoding="UTF-8" method="html" indent="no" /> <xsl:template match="/a"> <!-- When i change this to 'select "b"' three 3's are displayed. Now only 1--> <xsl:for-each select="b|c"> <xsl:value-of select="last()" /> </xsl:for-each> </xsl:template> </xsl:stylesheet> XML: <?xml version="1.0" encoding="UTF-8" ?> <a> <b /> <b /> <b /> </a>
