Project

Profile

Help

Bug #6524

open

xsl:message from stylesheets executed with fn:transform() cannot be obtained by message consummer

Added by Mircea Enachescu 23 days ago. Updated 18 days ago.

Status:
New
Priority:
Low
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2024-09-04
Due date:
% Done:

0%

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

Description

When using the fn:transform() inside a stylesheet I am not getting the output of xsl:message from the inner stylesheet in the message consummer. It is listed in the console though.

If I set a message consumer like: net.sf.saxon.s9api.AbstractXsltTransformer.setMessageHandler(Consumer), I receive only the message from the "main.xsl" and the one from "external.xsl" if only written in the console.


Files

input.xml (83 Bytes) input.xml Mircea Enachescu, 2024-09-04 09:44
external.xsl (407 Bytes) external.xsl Mircea Enachescu, 2024-09-04 09:44
main.xsl (555 Bytes) main.xsl Mircea Enachescu, 2024-09-04 09:44
Actions #1

Updated by Mircea Enachescu 18 days ago

We managed to resolve this by patching the

net.sf.saxon.functions.TransformFn.call(XPathContext, Sequence[]): line 636

by adding the following code:

if (context.getController() instanceof XsltController) {
  transformer.setMessageHandler(
    ((XsltController) context.getController()).getMessageHandler());
}

Regards, Mircea

Please register to edit this issue

Also available in: Atom PDF