Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#58 last() predicate in path optimized wrong

v6.5
closed
Michael Kay
5
2012-10-08
2002-02-04
Michael Kay
No

The optimization of the predicate [last()], or
[position()=last()], within a step of a path
expression is incorrect. The optimization replaces the
comparison of position()=last() with the correct code,
but it puts the new code in the wrong place: instead
of overwriting the [last()] predicate, it overwrites
which ever predicate is second in the list of
predicates. This has no adverse effects unless there
are three or more predicates, and [last()] is at
position 3 or greater. The bug does not affect filter
expressions.

Present in 6.5 and some earlier releases, but not in
6.2.2 and earlier. Not present in 7.0.

Original bug report:
http://sourceforge.net/forum/message.php?msg_id=1477425

The source code fix is at line 86 of module
com.icl.saxon.expr.Step: replace filters[1] with
filters[i].

Mike Kay

Discussion

  • Michael Kay
    Michael Kay
    2002-02-20

    Logged In: YES
    user_id=251681

    Cleared in 6.5.1