Hello Adrian. I don't see any real easy answers here. I think you're closest with method 1.
1) Create a ContentHandler filter that sits between _transformerHandler and transformer, and screen out the StartDocument events. 2) Set OMIT_XML_DECLARATION on the _transformerHandler, and then add the initial xml decl yourself. However, I'm still not too confident about this. 3) Completely different method: Have a XSL stylesheet use the document(...) function, passing it in some significant URLs. Depending on what you are doing, you may have to construct this on the fly. Then use a URIResolver to return your DOM node. I would be the most confident in (3). (1) might be the easiest from where you are at now. I wonder in the next gen JAXP (1.3, I think) should have explicit features to support this? -scott
