xsl:catch
In conjunction with xsl:try, the
xsl:catch instruction allows recovery from dynamic errors.
Content:
sequence-constructor
Permitted parent elements:
xsl:try
Attributes
|
|
|
Indicates which error codes are caught. If
absent, or if set to |
|
|
|
The effect of the element may be defined
either by a |
Details
It is possible to have more than one xsl:catch within an
xsl:try; the first one that matches the error is used.
Within the xsl:catch, a number of variables are available in the
namespace http://www.w3.org/2005/xqt-errors:
-
err:code- the error code as a QName -
err:description- the error description (error message) -
err:value- the error object (if available) -
err:module- the URI of the stylesheet module in which the error occurred -
err:line-number- the line-number of the source stylesheet where the error occurred -
err:column-number- for Saxon this will generally be unknown (-1)
The error can be re-thrown by using the error() function.