# saxon:read-once

This attribute may be set on the `xsl:copy-of` element. The allowed values are "yes" and "no". If set to yes, this attribute enables the optimization described in Streaming of Large Documents.

The attribute should be set to "yes" only if any external document read by this instruction is read at most once by the stylesheet. If this is not the case, the optimization is unsafe, since the functions `doc()` and `document()` are required to return the same results each time they are called.

Streaming is available only with Saxon-EE.

Next