The three methods isId()
, isIdref()
, and isNilled()
have been moved from the
ExtendedNodeInfo
interface into NodeInfo
, which means they must now be implemented by all concrete
classes implementing NodeInfo
. The ExtendedNodeInfo
interface has been dropped.
The SequenceIterator
interface now has a close()
method. This should be called
by any consumer of iterator events if the iterator is not read to completion. Currently the only effect is where the events
derive from streamed processing of an input document; in this case the close()
call causes the parsing of the input document
to be abandoned. This means for example that an expression such as exists(saxon:stream(('doc.xml')//x))
will stop parsing the input document as soon as an <x> element is found. Any user-written implementations of
SequenceIterator
must be changed to provide an implementation of this method; it can safely do nothing, but if the
SequenceIterator
uses another SequenceIterator
as input, the call to close()
should be passed on.
To allow further application control over dynamic loading in environments with non-standard class loaders or
other specialist requirements, dynamic loading of classes (and instantiation of these classes) is now delegated
to a new DynamicLoader
class owned by the Configuration
. This allows the application
to substitute a subclass of its own to intercept the calls that cause classes to be loaded dynamically.
The classes used to represent path expressions have been refactored (leading to some change in -explain
output). The two classes PathExpression
and SimpleMappingExpression
, which contained
a lot of repeated code, have been replaced by a structure in which the general class SlashExpression
has two subclasses, PathExpression
and AtomicMappingExpression
, for use when the rhs
operand of "/" is known to deliver nodes or atomic values respectively. The expression parser initially generates
a SlashExpression
, and this is replaced by a PathExpression
or
AtomicMappingExpression
if possible during the
type checking phase. If the type of the rhs cannot be determined, the SlashExpression
is retained as a concrete
class and is evaluated at run-time. The new PathExpression
class is not responsible for sorting and deduplicating
nodes; when a PathExpression
is created, it is always wrapped in a DocumentSorter
that has this responsibility,
and the DocumentSorter
is subsequently removed if the path expression is found to be presorted, or if sorting is
found to be unnecessary because of the context where the path expression is used.