[ http://nagoya.apache.org/jira/browse/XALANJ-1688?page=history ]
Henry Zongaro updated XALANJ-1688:
----------------------------------
Priority: Major (was: Blocker)
> Xalan-J interpretive problems with [last()] and [last() -1]
> -----------------------------------------------------------
>
> Key: XALANJ-1688
> URL: http://nagoya.apache.org/jira/browse/XALANJ-1688
> Project: XalanJ2
> Type: Bug
> Components: XPath-function
> Versions: CurrentCVS
> Environment: Operating System: Other
> Platform: Other
> Reporter: Brian Minchau
>
> This information is copied from bug 22949 but it seems to be a different
> problem than the one originally reported in 22949. This bug is only against
> Xalan-J interpretive, not XSLTC.
> [last()] predicate has problem for Xalan interpretive for the followingng
> test
> case:
> XML file:
> -----------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <doc>
> <num>1</num>
> <num>2</num>
> <num>3</num>
> </doc>
> -----------------------------------------------------
> XSLT file:
> -----------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:variable name="a" select="doc/num"/>
>
> <xsl:template match="doc">
> <out><xsl:text>
> </xsl:text>
> <xsl:value-of select="num[last()]"/><xsl:text>
> </xsl:text>
> <xsl:value-of select="num[last()-1]"/><xsl:text>
> </xsl:text>
> <xsl:value-of select="num[last()-1][last()]"/><xsl:text>
> </xsl:text>
> <xsl:value-of select="$a[last()-1][last()]" /><xsl:text>
> </xsl:text>
> </out>
> </xsl:template>
> </xsl:stylesheet>
> -----------------------------------------------
> Output using Xalan interpretive failed to evaluate double predicate [last()-1]
> [last()]:
> ------------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <out>
> 3
> 2
> 2
> </out>
> ------------------------------------------------------
> Correct output is:
> ------------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <out>
> 3
> 2
> 2
> 2
> </out>
> ------------------------------------------------------
> Christine Li's patch in bug 22949 fixed a similar problem with the testcase
> for
> XSLTC and also fixed bug 15327 but did not fix the problem above.
> Regards,
> Brian Minchau
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]