[jdom-interest] JDOMResult

Jason Hunter jhunter at acm.org
Tue Feb 26 11:25:38 PST 2002


Are you using the latest code in CVS?  As the FAQ says, please everyone
try that before submitting a possible bug report, and state in the
report that you have tried it.

-jh-

Matt Preston wrote:
> 
> Hi all,
> 
> I have been using the JDOMResult for some transformations where I need a
> JDOM Document at the end, but have run into a problem.  It seems that the
> Document produced never has a DocType set, even if my xsl stylesheet creates
> one.
> 
> e.g. I created a doctype with this xsl
> 
> <xsl:output indent="yes" method="xml" encoding="UTF-8"
> doctype-public="-//IPTC//NITF DTD 2.0//EN"
> doctype-system="http://www.nitf.org/site/nitf-documentation/nitf-2-5-no-comm
> ents.dtd"/>
> 
> I used this code to do the transformation
> 
>   JDOMResult _result = new JDOMResult();
> 
>   StreamSource _source = new StreamSource(anInputStream);
> 
>   _transformer.transform(_source, _result);
> 
>   Document _document = _result.getDocument();
> 
> _document.getDocType() returns null.  If rather than using JDOMResult, I use
> a StreamResult and make the Document via a SAXBuilder, the Document has the
> correct DocType.
> 
> Has anyone else experienced this?
> 
> Cheers,
> Matt Preston
> 
> ---
> Not dirty!
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.314 / Virus Database: 175 - Release Date: 11/01/2002
> 
> ---
> Not dirty!
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.314 / Virus Database: 175 - Release Date: 11/01/2002
> 
> _______________________________________________
> 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