Project

Profile

Help

Bug #4376

closed

xsl:message content is not available within xsl:catch as $err:value

Added by Michael Kay over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT conformance
Sprint/Milestone:
-
Start date:
2019-11-06
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
9.9, trunk
Fix Committed on Branch:
9.9, trunk
Fixed in Maintenance Release:
Platforms:

Description

The specification requires that when the error triggred by an xsl:message instruction with terminate="yes" is caught, the message body should be available within the xsl:catch as the value of $err:value.

This appears to be unimplemented and untested.

I have added a test case message-0501.

Reported by AirQuick on the saxon-help mailing list at sourceforge.

Actions #1

Updated by Michael Kay over 4 years ago

This is tricky to implement because xsl:message output is sent to a user-supplied message listener, and it's only actually assembled into an in-memory tree if the message listener chooses to do so.

Even if we try to implement it only within the default message listener, we still have the problem that it requires extending the interface to the message listener so that the assembled tree can be retained.

This leaves the option (not especially attractive, but viable) of having xsl:message (if terminate=yes) first construct the message as an in-memory tree (which can be referenced from the exception object picked up by xsl:catch), and then replay this tree to the message listener.

Actions #2

Updated by Michael Kay over 4 years ago

  • Status changed from New to In Progress

Fix implemented for 9.9, still needs to be applied to trunk.

Note that Saxon inserts a processing instruction into the xsl:message document containing the error code and the location of the xsl:message instruction. This is convenient, but not strictly according to spec.

Actions #3

Updated by Michael Kay over 4 years ago

  • Category set to XSLT conformance
  • Status changed from In Progress to Resolved
  • Priority changed from Low to Normal
  • Fix Committed on Branch 9.9, trunk added
Actions #4

Updated by O'Neil Delpratt over 4 years ago

  • Status changed from Resolved to Closed
  • Fixed in Maintenance Release 9.9.1.6 added

Patch committed to the Saxon 9.9.1.6 maintenance release.

Please register to edit this issue

Also available in: Atom PDF