PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL BE LOST SOMEWHERE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3031 *** shadow/3031 Tue Aug 7 15:37:52 2001 --- shadow/3031.tmp.26465 Tue Aug 7 15:37:53 2001 *************** *** 0 **** --- 1,72 ---- + +============================================================================+ + | current() function doesn't work within nested predicates | + +----------------------------------------------------------------------------+ + | Bug #: 3031 Product: XalanJ2 | + | Status: NEW Version: 2.1.0 | + | Resolution: Platform: Other | + | Severity: Normal OS/Version: Other | + | Priority: Other Component: Xalan | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + Source: + <foo> + <bar>1</bar> + <bar>2</bar> + <bar>3</bar> + <bang> + <bat>1</bat> + </bang> + <bang> + <bat>3</bat> + </bang> + </foo> + + + Stylesheet: + <xsl:transform version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + + <xsl:template match="/"> + <first worksCorrectly="YES"> + <xsl:for-each select="/foo/bar"> + <xsl:for-each select="/foo/bang[bat=current()]"> + <xsl:copy-of select="."/> + </xsl:for-each> + </xsl:for-each> + </first> + <second worksCorrectly="NO! (should do the same thing)"> + <xsl:for-each select="/foo/bar"> + <xsl:for-each select="/foo/bang[bat[.=current()]]"> + <xsl:copy-of select="."/> + </xsl:for-each> + </xsl:for-each> + </second> + </xsl:template> + + </xsl:transform> + + + Correct result: + <first worksCorrectly="YES"><bang> + <bat>1</bat> + </bang><bang> + <bat>3</bat> + </bang></first><second worksCorrectly="NO! (should do the same thing)"><bang> + <bat>1</bat> + </bang><bang> + <bat>3</bat> + </bang></second> + + + Xalan's result: + <first worksCorrectly="YES"><bang> + <bat>1</bat> + </bang><bang> + <bat>3</bat> + </bang></first><second worksCorrectly="NO! (should do the same thing)"/> \ No newline at end of file
