Skip to content

Commit

Permalink
Merge pull request qt4cg#1505 from michaelhkay/1503-err-map-in-XSLT
Browse files Browse the repository at this point in the history
1503 Add err:map, err:stack-trace, err:additional to XSLT
  • Loading branch information
michaelhkay authored Nov 26, 2024
2 parents 79bc1bb + e61b9b9 commit d5d9737
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
1 change: 0 additions & 1 deletion specifications/xslt-40/src/element-catalog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,6 @@
</e:allowed-parents>
</e:element-syntax>


<!-- Diagnostics -->

<e:element-syntax name="message">
Expand Down
30 changes: 30 additions & 0 deletions specifications/xslt-40/src/xslt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15690,6 +15690,14 @@ and <code>version="1.0"</code> otherwise.</p>

<div2 id="try-catch">
<head>Try/Catch</head>

<changes>
<change issue="1503">
New variables <code>err:stack-trace</code>, <code>err:additional</code>,
and <code>err:map</code> are available within an <elcode>xsl:catch</elcode> clause.
</change>
</changes>


<p>The <elcode>xsl:try</elcode> instruction can be used to trap
dynamic errors occurring within the expression it wraps; the recovery action if such
Expand Down Expand Up @@ -15845,6 +15853,28 @@ and <code>version="1.0"</code> otherwise.</p>
instruction where the error occurred; an empty sequence if the information
is not available. The value <rfc2119>may</rfc2119> be approximate.</td>
</tr>
<tr>
<td rowspan="1" colspan="1">err:stack-trace</td>
<td rowspan="1" colspan="1">xs:string?</td>
<td rowspan="1" colspan="1">An <termref def="dt-implementation-dependent"/>
string containing diagnostic
information about the state of execution at the point where the error occured,
or an empty sequence if no stack trace is available.</td>
</tr>
<tr>
<td rowspan="1" colspan="1">err:additional</td>
<td rowspan="1" colspan="1">item()*</td>
<td rowspan="1" colspan="1">Additional <termref def="dt-implementation-defined"/>
information about the error.</td>
</tr>
<tr>
<td rowspan="1" colspan="1">err:map</td>
<td rowspan="1" colspan="1">map(xs:string, item()*)</td>
<td rowspan="1" colspan="1">A map with entries that are bound to the variables
above. The local names of the variables are assigned as keys. No map entries
are created for those values that are empty sequences. The variable can be
used to pass on all error information to another function.</td>
</tr>
</tbody>
</table>

Expand Down

0 comments on commit d5d9737

Please sign in to comment.