I believe Result Document Handlers are supported in Xalan, though obviously not 
in the Saxon namespace and I haven't compared capabilities in a very long time. 
They *may* have been standardized in the TrAX abstraction layer.

Traveling right now but can try to get an answer to you by sometime next week.


--
Joe

Car Talk has been advised that the staff opticians, C. F. Eyecare, are now 
under new management. It's Ike and Zeke Leary, now; Lorraine is gone.
________________________________
From: Martin Honnen <[email protected]>
Sent: Tuesday, October 28, 2025 3:19:57 PM
To: [email protected] <[email protected]>
Subject: API to handle (XSLT 2 or 3) secondary result documents


This is a question regarding the Apache Xalan XSLT 3 development branch
that has support for xsl:result-document to have a single XSLT
transformation create more than one result document, i.e. to use
xsl:result-document to create secondary result documents.

With Saxon, in Java code (though using Saxon's s9api, not JAXP), it is
possible to handle those result documents in your code with
https://www.saxonica.com/html/documentation12/javadoc/net/sf/saxon/s9api/AbstractXsltTransformer.html#setResultDocumentHandler(java.util.function.Function).

Is there any way to do this in Xalan or is any API planned?

The reason why I ask: in my XSLT fiddles for Saxon I tend to capture the
result documents and that way ensure they are selectable and viewable
for the fiddle user; I would like to do the same for my fiddle using the
Xalan XSLT 3.0 development branch.

As you have fn:transform support, I think, where you have to return all
results as an XDM map, perhaps it is easy to turn that into an API; or I
should explore doing XPath 3.1 and fn:transform in my fiddle instead of
using Transformer to run XSLT 3.0 code.

Reply via email to