[jdom-interest] (no subject)

Brett McLaughlin brett.mclaughlin at lutris.com
Mon Jun 12 15:52:31 PDT 2000


Kevin Regan wrote:
> 
> How about we add the following class:
> 
> org.jdom.adaptor.StandardDOMAdaptor( DOMImplementation DOMImpl );

-1. I really feel like I've been clear here - nobody in JDOM ever has to
know what DOM is, how to use it, or anything else. They know there is
such a think as a DOM Document, and that's it. That's all it should be,
and this is just a solution for a problem that can be solved much
better. I don't have time to solve it now, but I'll write the thing on
the plane home if I have to.

I will not ever require the user to know DOM to get access to and from
DOM - it's just not good programming.

-Brett

> 
> This will allow folks to use implementation for which there
> currently is no adaptor.  In addition, most of the other
> adaptors can be implemented in terms of this class:
> 
> org.jdom.adaptor.XercesDOMAdaptor() extends StandardAdaptor {
> 
>         super( org.apache.xerces.dom.DOMImplementationImpl() );
> 
> }
> 
> Finally, the DOMOutputter would be given the following method:
> 
> DOMOutputter.output( org.jdom.Document,
> org.jdom.adaptor.AbstractDOMAdaptor );
> 
> I client could do the following:
> 
> org.jdom.Document jdomDoc = ...;
> 
> org.w3c.dom.Document = outputter.output( jdomDoc ); // use the default,
> // Xerces?
> 
> org.w3c.dom.Document = outputter.output( jdomDoc, new
> XercesDomAdaptor() ); // creates a StandardDOMAdaptor
> 
> org.w3c.dom.Document = outputter.output( jdomDoc, new
> StandardDOMAdaptor( new org.w3c.dom.DOMImplementationImpl() );
> 
> This seems pretty flexible.
> 
> --Kevin
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com



More information about the jdom-interest mailing list