#600 Streaming mode requires predicates

v8.8
closed
5
2012-10-08
2006-10-03
Michael Kay
No

The Saxon-SA facility to process documents in streaming
mode (the "read-once" facility described at
http://www.saxonica.com/documentation/sourcedocs/serial.html
) was enhanced in Saxon 8.8 to allow the path
expression to contain predicates. Unfortunately an
error was introduced at the same time which means it no
longer works without predicates.

As a workaround, replace

<xsl:copy-of select="doc('large.xml')/a/b/c"/>

by an expression such as

<xsl:copy-of select="doc('large.xml')/a/b/c&lt;span&gt;[local-name()='c']&lt;/span&gt;"/>

(taking care to choose a predicate that will not be
optimized out).

(For my reference: source fix is to module OptimizerSA,
method optimizeSequentialCopy).

Discussion