Streamed processing of input documents
Streamed execution of xsl:call-template is possible provided the called template does not use the context item, and does not allow parameters that are bound to nodes; or if all the supplied arguments and the context item are grounded.
function now has usage inspection rather than absorption, which means that a call on
has-children() in streamed code is typically motionless; that is to
say, it is possible to test whether an element has children without consuming the
content. This is achieved using a tiny amount of look-ahead in the parsing pipeline.
The ability to initiate streaming using
mode="streamable"/> has been dropped. Use xsl:stream instead. The option has been dropped
because it is not in the XSLT 3.0 specification, and indeed was non-conformant because
doc() is required to return stable results if called twice to process
the same URI.
The ability to use explicit positions in streaming match patterns has been dropped: for
match="p" is no longer motionless. This aligns Saxon with the
W3C specification. Maintaining the data to support such patterns was a significant
overhead, and the data was used only for this one purpose.
The system of
UTypes used for streamability analysis in the spec is now
implemented, alongside Saxon's traditional static type analysis. The
system gives the potential for more precise static typing of constructs such as
use-accumulators attribute of xsl:stream is implemented. This means that an
accumulator is not available with a particular input read using
unless it was nominated on the
use-accumulators attribute of xsl:global-context-item is implemented.
This means that an accumulator is not available with the principal streamed input to the
stylesheet unless it was nominated on the
Streamed execution of
expressions is implemented.