<?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet href="../../make-menu.xsl" type="text/xsl"?><html> <head> <this-is section="extensions" page="instructions" subpage="break"/> <!-- Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: saxon:break</title> <meta name="coverage" content="Worldwide"/> <meta name="copyright" content="Copyright Saxonica Ltd"/> <meta name="title" content="Saxonica: XSLT and XQuery Processing: saxon:break"/> <meta name="robots" content="noindex,nofollow"/> <link rel="stylesheet" href="../../saxondocs.css" type="text/css"/> </head> <body class="main"> <h1>saxon:break</h1> <p>A <code>saxon:break</code> instruction causes early exit from a loop defined using <a class="bodylink" href="../../extensions/instructions/iterate.xml">saxon:iterate</a>. The instruction must appear lexically within the <code>saxon:iterate</code> element.</p> <p>If the <code>saxon:iterate</code> instruction takes its input from streamed document (using the <code>saxon:stream()</code> function) then executing <code>saxon:break</code> 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.</p> <p>For further details and examples see <a class="bodylink" href="../../extensions/instructions/iterate.xml">saxon:iterate</a>.</p> <p><i>This instruction is available in Saxon-EE only</i></p> <table width="100%"> <tr> <td> <p align="right"><a class="nav" href="call-template.xml">Next</a></p> </td> </tr> </table> </body> </html>