[jdom-interest] DTD information not present in DocType

philip.nelson at omniresources.com philip.nelson at omniresources.com
Mon Oct 1 23:06:37 PDT 2001

> Sorry, but I do not understand: With the unchanged code (i.e. 
> the test on 
> expand is present), it seems the SAX parser still fires the 
> DTD events but 
> DocType's internalSet then contains only the DTD comments.

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE catalog SYSTEM "file:///C:/temp/jdom-test/bugs/Test5/testXSL.dtd">

<catalog name="Test XSLT" version="0.4"
    <server type="DODS" ID="Thredds"

In your document, there are no dtd events to fire because there is no
internal subset, even if you setExpandEntities to false.  There is only the
external dtd and that is not handled by the declhandler.  The comment must
be coming out because the characters method got called during parsing of the
dtd.  I didn't expect that but it still leaves a valid internal subset. 

> I don't mind setting one or two flags but I'd like to make 
> sure that either 
> DocType's internalSet is complete or totally empty.

I don't think there would be a way for SAXHandler to tell if the comment
characters came from the internal subset or the dtd.

> One last question: You use "internal subset"; what's the 
> difference between an 
> "internal subset" and the document DTD?

answered by Bob! 

More information about the jdom-interest mailing list