Hi Roger, Thanks for the prompt response.
I am porting an XML API that wraps JAXP to an API that wraps xerce-c/xalan-c to eliminate the wrapper API's dependency on Java. The API includes wrappers around the JAXP DOMSource and StreamSource and JAXP DOMResult classes. Xalan-c appears to have equivalents for the JAXP DOMSource and StreamSource classes but no direct equivalent for DOMResult. A workaround for DOMResult might be a class that streams the transform result to the Xerces-c parser and returns the result. Regards, Paul From: Roger Leigh <rle...@codelibre.net> Sent: Tuesday, August 11, 2020 6:23 PM To: c-users@xalan.apache.org Subject: Re: Transforming xerces-c::DOMDocument into a xerces-c::DOMDocument 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