I am trying to an xsl transformation that right now by a java object I am generating an intermediary XML and that XML is again passed to generate a new XML finally right now whi
You pass the XML (not a valid document, with 2 root elements) to newTransformer
, instead of passing the XSLT stylesheet. The compiler does not even complain about the document not to be a valid stylesheet, it complains it is ill-formed XML (an XSLT stylesheet is itself an XML document). You have to read TransformerFactory
documentation, I am afraid.