[jdom-interest] DOCTYPE instruction & JDOMSource

Jason Hunter jhunter at acm.org
Wed Feb 20 11:51:29 PST 2002


Are you using the latest code in CVS?

-jh-

sv3n at gmx.at wrote:
> 
> Hi!
> 
> Hope this is not too much of a newbie question here:
> 
> Having xstl templates containing the following xsl:output element:
> 
> <xsl:output method="html" encoding="utf-8"
> doctype-public="-//W3C//DTDHTML 4.0 Transitional//EN"
> doctype-system="http://www.w3.org/TR/REC-html4/loose.dtd" indent="yes"/>
> 
> I was hoping to receive a html file containing the specified doctype instruction.
> 
> This seems to work ok when directly transforming with xalan, using some code like this:
> 
> JDOMSource source = new JDOMSource(document);
> Result result = new StreamResult(out);
> transformer.transform(source, result);
> 
> When I instead of transforming directly to a StreamResult use a
> JDOMResult und print the document using XMLOutputter:
> 
> JDOMSource source = new JDOMSource(document);
> JDOMResult result = new JDOMResult();
> transformer.transform(source, result);
> XMLOutputter outputter = new XMLOutptutter("  ", true);
> outputter.output(result.getDocument(), out);
> 
> Then the DOCTYPE instruction is missing in the resulting html.
> 
> Anybody, any clues for me ?
> 
> thanks,
> 
> gernot.
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com



More information about the jdom-interest mailing list