[jdom-interest] DOMBuilder with customized adapter

Christian Holmqvist acroo at iname.com
Fri Feb 16 11:21:35 PST 2001


Hi

> You don't touch SAX if you use SAXBuilder.

I don't see how the SAXBuilder would help me, I still can't initialize my
adapter since the SAXBuilder uses reflection to initilize the Adapter (why
is it called driver in the saxbuilder API doc??).

> > Is there an easy way to perform validation of single elements
> with SAX ?
> > I would like it to work the way that when I create a Element
> from a Document
> > it already then tells me if the element is valid to create.
>
> True runtime validation is impossible.

Hmm, I can see why it is not possible now. But isn't it so that nodes is
always created with the base from a document and then validation of the node
would be possible based on the base documents DTD / Schema. A validation /
creation class have to be able to create nodes with validation turned on.

> > > BTW, we use reflection so we can compile JDOM without having to have
> > > *every supported parser* available in the classpath at compile time.
> >
> > That could easily be solved with the setup of ant.
>
> Not true.  With ant you can skip building source, but then you can't run
> it.

Oki, I can see the runtime problem, but by using reflection on the creation
of adapter sepecific details concrete adapter can still be implemented by
used overloading the init / setup / create method. It is all in the design
*smile*

Cheers Christian




More information about the jdom-interest mailing list