Hi Paul,
I would love to be proven wrong, but I'm fairly sure this isn't
possible, because I would have loved to have been able to do this in my
own projects where multiple transforms needed applying to a DOMDocument
in sequence and spent quite some time investigating it. I imagine that
this limitation stems from the result of the transform being potentially
in any format possible: plain text, JSON, YAML, HTML, XHTML, XML etc.
So XSLTResultTarget is fairly limited in allowing only streaming output.
Kind regards,
Roger
On 11/08/2020 21:55, Paul Kinnucan wrote:
Hi,
Does xalan-c support transforming a xerces-c::DOMDocument into another
xerces-c::DOMDocument?
The xalan-c API doc indicates that you can transform a
xerces-c::DOMDocument into a file or output stream. Specifically, an
XSLInputSource can be a
xalan-c::XercesDOMWrapperParsedSource
<https://apache.github.io/xalan-c/api/classxalanc_1_1XercesDOMWrapperParsedSource.html#a99ba70ee0bc25196712711a5a41967b4>.
But I don’t see any variant of the transform method that would result
in a xerces-c::DOMDocument, i.e., an XSLTResultTarget can only be a
file or a stream.
Is it possible to stream the transform output to the Xerces parser to
get a xerces-c::DOMDocument as a transform result?
Regards,
Paul