Project

Profile

Help

Support #6021

closed

I cannot combine XSLT instructions with actual XML output during tracing. The XML output is "too late".

Added by Gerben Abbink over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2023-05-08
Due date:
% Done:

0%

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

Description

I am trying to combine the output of an XSLT transformation during tracing with the actual XSLT instructions.

I have implemented a TraceListener and a Writer.

However, the output XML that is send to the Writer is always "too late".

In this example, TraceListener's enter() is called with a NamespaceConstructor, but no namespace is actually written to the XML output at that moment. The namespace is written later during FixedElement.

Am I doing something wrong?
...
enter instruction 21:34 net.sf.saxon.expr.instruct.ForEach 2:54
enter instruction 22:52 net.sf.saxon.expr.instruct.NamespaceConstructor 3:45 << **NamespaceConstructor**
leave instruction 22:52 net.sf.saxon.expr.instruct.NamespaceConstructor
...
enter instruction 102:69 net.sf.saxon.expr.instruct.FixedElement 5:107
        [<?xml version="]
        [1.0]
        [" ]
        [encoding="]
        [UTF-8]
        ["]
        [?>]
        [
]
        [<]
        [xsl:stylesheet]
        [ ]
        [xmlns:pre]
        [=]
        ["]
        [http://www.ibm.com] << **Actual namespace in the XML output** .
        ["]
        [

Please register to edit this issue

Also available in: Atom PDF