[jdom-interest] DTD information not present in DocType

Laurent Bihanic laurent.bihanic at atosorigin.com
Thu Sep 27 07:03:41 PDT 2001


Using the latest JDOM from CVS, I failed to get any information stored into 
DocType. I managed to track this problem down to SAXBuilder that performs the 
following test in configureParser():

         // Try setting the DeclHandler if entity expansion is off
         if (!expand) {
             try {
             } catch (SAXNotSupportedException e) {
                 // No lexical reporting available
             } catch (SAXNotRecognizedException e) {
                 // No lexical reporting available

Why is the DeclHandler registration dependent on entity expansion? Is that a 
leftover from the time where DTD information was not stored in DocType?
Removing the test on expand fixes the problem.

Another question: Shouldn't JDOM also attempt to register DeclHandlers using 
the alternate property name "http://xml.org/sax/handlers/DeclHandler" just as 
it does for LexicalHandlers?


                 (o o)
Laurent Bihanic           | Tel: +33 (0)1  (Direct line)
Atos Origin               |      +33 (0)1
Intégration - e-Business  | Fax: +33 (0)1
Les Miroirs - Bat. C      |
18, avenue d'Alsace       |
F-92926 La Defense Cedex  | e-Mail: laurent.bihanic at atosorigin.com

"Microsoft isn't the answer. Microsoft is the question and the answer
  is no."

The opinions expressed are entirely my own and may not necessarily be
those of my employer.  Also, I am not now nor have I ever been a
lawyer.  My opinions are provided as-is with absolutely no warrantee of
merchantability or fitness for any particular use.  Besides, you can't
prove I typed this.  No body saw me type this.  Who says I typed this?

More information about the jdom-interest mailing list