[jdom-interest] XMLOutputter/SAXBuilder

Alex Rosen arosen at silverstream.com
Fri Sep 14 08:15:01 PDT 2001

> In other words, it's a "bug/feature" of SAX 2.0 itself. I don't
> know of anyway
> to turn that processing off, and since SAX doesn't yet provide any
> additional typing or related information about default vs. declared
> attributes, I'm not sure how we could take care of it if we wanted to.

It looks like there are two Xerces-specific features that relate to this:


True:   Load the DTD and use it to add default attributes and set attribute
types when parsing.
False:   Build the grammar but do not use the default attributes and
attribute types information it contains.
Default:   true
Note:   This feature is always on when validation is on.


True:   Load the external DTD.
False:   Ignore the external DTD completely.
Default:   true
Note:   This feature is always on when validation is on.

I'm not exactly sure what the difference is between the two. Maybe it has to
do with entities?

Gary, in the latest CVS source (not in beta 7) you can try turning off one
of these features on the SAXBuilder, and see if this helps. (Or you can do
this in beta 7, by subclassing SAXBuilder and overriding configureParser.)

I don't know if Crimson (or any other parser) has a similar feature. You
could argue that we should always try to turn off this feature, and just
keep going if the parser doesn't recognize it. This won't make anything
worse than it is today, but it will make JDOM behave differently with
different parsers, which is probably not worth it. If this works, then maybe
a FAQ entry would be the appropriate solution.

Alex Rosen
alex at silverstream.com

More information about the jdom-interest mailing list