Hmm… In the code PD4ML API assumes, that InputStream sourceStream returns HTML.

There was no PD4ML version, which could implicitly transform XML to HTML. The transformation should be done in advance to PD4ML API call.

If the comment means XHTML under “XML”, the conversion will work, but anyway any XSL references will be ignored.