SAXONICA

Saxon Documentation
Full Contents
About Saxon
Changes in this Release
Notices
Using XSLT 2.0
Using XQuery
Handling Source Documents
XML Schema Processing
XPath API for Java
Saxon on .NET
Extensibility
Saxon Extensions
| Introduction
| EXSLT Extensions
| Extension attributes (XSLT only)
| Additional serialization parameters
| Extension functions
» | Extension instructions
Sample Saxon Applications
The Saxon SQL Extension
XSLT Elements
XPath 2.0 Expression Syntax
Function Library
Standards Conformance

# saxon:break

A `saxon:break` instruction causes early exit from a loop defined using saxon:iterate. The instruction must appear lexically within the `saxon:iterate` element.

If the `saxon:iterate` instruction takes its input from streamed document (using the `saxon:stream()` function) then executing `saxon:break` will cause the parsing and analysis of that document to terminate. This can be very useful when you only want to examine a small amount of data near the start of a large document. Note however that it means that any well-formedness or validity errors appearing later in the source document will not be detected.

For further details and examples see saxon:iterate.

Next