[ http://nagoya.apache.org/jira/browse/XALANJ-1434?page=history ]
Henry Zongaro updated XALANJ-1434:
----------------------------------
Priority: Major
> org.apache.xpath.axes.AxesWalker getLastPos: duplicate predicate testing
> ------------------------------------------------------------------------
>
> Key: XALANJ-1434
> URL: http://nagoya.apache.org/jira/browse/XALANJ-1434
> Project: XalanJ2
> Type: Bug
> Components: XPath
> Versions: 2.4Dx
> Environment: Operating System: All
> Platform: All
> Reporter: Dimitry E Voytenko
> Assignee: Xalan Developers Mailing List
> Attachments: lastpos.patch
>
> In class org.apache.xpath.axes.AxesWalker method getLastPos there's a fragment
> of code:
> walker.setPredicateCount(walker.getPredicateCount() - 1);
> Thus, in expression x[last() != position()][true()] first predicate is
> checked
> twice.
> XML sample:
> <?xml version="1.0" encoding="UTF-8"?>
> <doc>
> <item>1</item>
> <item>2</item>
> <item>3</item>
> </doc>
> Result of
> <xsl:copy-of select="/doc/item[last() != position()][true()]"/>
> is
> <item>1</item>
> and should be
> <item>1</item>
> <item>2</item>
> XSL work-around:
> <xsl:copy-of select="(/doc/item[last() != position()])[true()]"/>
> Java code fix: replace code line in org.apache.xpath.axes.AxesWalker
> getLastPos:
> walker.setPredicateCount(walker.getPredicateCount() - 1);
> to
> walker.setPredicateCount(this.m_predicateIndex);
--
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]