last() and strip-space with external object models
The Saxon XSLT and XQuery processor, developed by Saxonica
Brought to you by:
mhkay
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