[jdom-interest] Issue with Doctype (systemId , publicId whitespace)

Per Norrman pernorrman at telia.com
Mon May 10 09:12:51 PDT 2004


Collin VanDyck wrote:
>> But the transformation works, doesn't it? I assume you transform the 
>> JDOM document using JDOMSource, and in that case the error shouldn't
>> have any effect on the actual tranformation.
> 
> 
> The transformation does work, but for some reason further 
> transformations strip out the doctype.  After reading your response 
> (thanks by the way for the detail), I think the problem may lie elsewhere.
> 
> If this is the case, is there any way I can then suppress these errors 
> that are coming out on STDERR?
> 

Nothing immediate that I can think of. The problem is that the parsing
of the doctype fails, coupled with the fact that SAXOutputter does not
assign an ErrorHandler to the XMLReader that parses the Doctype.

Either patch the XMLOutputter source, or (temporarily) remove the
DocType during transformation.

(I'll submit a patch for SAXOutputter, but that doesn't help you while
using JDOM-B8).

/pmn



More information about the jdom-interest mailing list