Menu

#316 last() and strip-space with external object models

v8.3
closed
5
2012-10-08
2005-02-23
Michael Kay
No

The last() function gives incorrect results, and
corrupts the current sequence, when the current
sequence is based on an axis of an external (DOM, JDOM,
or XOM) object model with whitespace stripping
specified in the stylesheet.

Present in 8.3 and all known previous releases.

The tests that failed were using the attribute and
namespace axes, however, the bug is not specific to
those axes and it's not obvious why other cases appear
to work successfully.

Source fix: In net.sf.saxon.om.StrippedNode, line 478,
change the getAnother() method to read

    public SequenceIterator getAnother() {
        return new

WrappingIterator((AxisIterator)base.getAnother(), parent);
}

Michael Kay

Discussion