# Extension instructions

A Saxon extension instruction is invoked using a name such as `<saxon:localname>`.

The `saxon` prefix (or whatever prefix you choose to use) must be associated with the Saxon namespace URI `http://saxon.sf.net/`. The prefix must also be designated as an extension element prefix by including it in the `extension-element-prefixes` attribute on the `xsl:stylesheet` element, or the `xsl:extension-element-prefixes` attribute on any enclosing literal result element or extension element.

However, top-level elements such as `saxon:collation` and `saxon:script` can be used without designating the prefix as an extension element prefix.

The extension instructions and declarations are:

- saxon:assign: assigns a new value to a global variable

- saxon:break: breaks out of a saxon:iterate loop

- saxon:call-template: calls a template whose name is decided at run-time

- saxon:catch: used within saxon:try to catch dynamic errors

- saxon:collation: names and describes a collating sequence

- saxon:continue: continues execution of a saxon:iterate loop

- saxon:doctype: constructs a serialized DOCTYPE declaration

- saxon:entity-ref: creates an entity reference in the serialized output

- saxon:finally: continues execution of a saxon:iterate loop

- saxon:import-query: imports functions from an XQuery library module

- saxon:iterate: iterates over a sequence in order, allowing parameters to be set

- saxon:mode: declares properties of a mode

- saxon:script: declares an extension function

- saxon:try: evaluates an expression with recovery from dynamic errors

- saxon:while: iterates until a condition becomes false

Next