[jdom-interest] On-Line and Off-Line DTD

Jason Hunter jhunter at collab.net
Fri Sep 7 14:44:22 PDT 2001

Laurent Bihanic wrote:
> philip.nelson at omniresources.com wrote:
> > No doubt some people will want something else there but this is what we
> > agreed to so this is what I have implemented.
> >
> > I have not followed through to DOMBuilder, DOMOutputter or SAXOutputter.
> > This will have to be a more interesting exercise for somebody else.
> > Volunteers?
> I had a look at a possible implementation for SAXOutputter. Firing DTD events
> seems quite easy: Just create a SAX parser instance, parse the DTD string and
> here are the events! You just have to stop the parsing once the DTD parsing is
> complete.
> The problem is "create a SAX parser instance": The code to do that is hidden
> in SAXBuilder.

Isn't the parser creation exposed now after Alex's breakout of the
builder, specifically in the createParser() method?

>   Would it make sense to extract this code in a separated class (e.g.
> org.jdom.util.Parsing)? With the JSR, will JDOM continue to support non-JAXP
> parsers?

Yes, if I have my way.  :-)

> Last solution: Add a nested sub-class of SAXBuilder to SAXOutputter to reuse
> the parser creation code?
> Jason, which direction do you think we should go?

I think using the SAX parser that's already there to do the DTD parsing
makes sense at least in the near term.  Can you check if the
createParser() method provides enough of a hook for you to do what you


More information about the jdom-interest mailing list