[jdom-interest] XSL transformations and missing doctypes

Lee Turner lee at leeturner.org
Tue Aug 24 08:32:17 PDT 2004


Hi

I am using JDOM b10 in my system where I am using xsl to transform my JDOM
documents into xhtml to be displayed on the front end.  My problem is that
when the transformation has been done I am missing the doctype that I set in
the xsl.  The code I am using is as follows :

        //snip
        Transformer transformer = template.newTransformer();
        JDOMSource source = new JDOMSource(incomingDocument);
        JDOMResult result = new JDOMResult();
        transformer.transform(source, result);
        return result.getDocument();

I have taken my xsl and tried that outside of JDOM, using static xml instead
and the doctype is there in the output and I have even just used the
javax.xml classes to do the transform using DOMSource and StreamResult etc
and the doctype is in the output here as well.

I have looked on the web and news groups and there seem to be a few
references to missing doctypes, but I couldn't find anything to say whether
it has been fixed in the latest CVS of JDOM.  I downloaded the daily
snapshot from the JDOM web site and still saw the same behaviour.

Has anyone else seen this when performing transformations using JDOM  ?
Any help would be greatly appreciated.

Kind regards
Lee



More information about the jdom-interest mailing list