Project

Profile

Help

Bug #3636

closed

Obtaining the full context sequence

Added by Michael Kay almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Diagnostics
Sprint/Milestone:
-
Start date:
2018-01-22
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.8, trunk
Fix Committed on Branch:
9.8, trunk
Fixed in Maintenance Release:
Platforms:

Description

In earlier Saxon releases, it was possible to obtain the full sequence of items containing the focus (context item, position and size) because the SequenceIterator interface provided a method getAnother() allowing a new iterator to be obtained, returning the same items, but positioned at the start of the sequence. This method was used mainly to implement the last() function, but it was also used by some third-party tools to provide debugging support.

The getAnother() method has been dropped in 9.8. This was partly because it was difficult to provide it for all iterators (for example, iterators accessing streamed input) and also because some implementations of the method had problems caused by evaluating expressions more than once (which in unusual cases might not deliver the same result each time).

To retain the debugging capability we are considering a different mechanism, that allows the FocusTrackingIterator maintained to represent the focus in most cases to retain the full focus sequence rather than just the values of context item, position, and last.

Please register to edit this issue

Also available in: Atom PDF