I know the recommended method is to simply output the instruction to
whatever output stream & disable the com.sun.xml.bind.xmlDeclaration
property on the marshaller, but that doesn't work so well when
outputting to a JAXBSource object.
Any suggestions?
code looks something like..
JAXBSource source = new JAXBSource(marshaller, document);
transfomer.transform(source, new StreamResult(out));
The xsl transformer really does not like this. If I convert to a Dom and
append a processing instruction to that, it works fine, but it seems
like an unnecessary conversion step.