You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2004/01/06 15:38:37 UTC

DO NOT REPLY [Bug 25924] New: - XSLTC 252cvs,xsl:for-each loop fails with usage of last() and variable

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=25924>.
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=25924

XSLTC 252cvs,xsl:for-each loop fails with usage of last() and variable

           Summary: XSLTC 252cvs,xsl:for-each loop fails with usage of
                    last() and variable
           Product: XalanJ2
           Version: CurrentCVS
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Major
          Priority: Other
         Component: org.apache.xalan.xsltc
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: chris5@directbox.com


with translet: 
- when performing a <xsl:for-each> over exactly 2 nodes, the loop breaks after
  the first iteration.
- The call of the last() function and the useage of a variable is essential
  for the bug. Without them it works.
- With a number of nodes <> 2 it works fine, too.

- The interpreter works fine

Xalan 252 CVS 28.12.03 

Example XML:
<donkeyUI>
	<column/>
	<column/>
</donkeyUI>

XSL:
...
<xsl:variable name="var" select="."/>
    <xsl:for-each select="$var/column"><xsl:value-of select="last()"/>  
    </xsl:for-each>
</xsl:for-each>
...

Result: <html><body>foo</body></html>