[jdom-interest] W3C - JDOM Adapter Proposal

Dennis Sosnoski dms at sosnoski.com
Thu Jun 14 10:38:38 PDT 2001


You might want to look at what's been done by dom4j (http://dom4j.org). I know they
were at least working toward supporting a standard DOM interface to the
representation.

dom4j uses factories and interfaces extensively. With the concrete classes used by
JDOM it may be a little more difficult to implement a virtual DOM view, but the dom4j
implementation should at least give some ideas.

  - Dennis

Martin Bravenboer wrote:

> Hello,
>
> JDOM is an excellent DOM implementation.
> However the everlasting conversion to the
> W3C DOM is not very nice. Of course you
> can output a JDOM Document to a W3C Document,
> but the changes in the W3C Document are
> not reflected in the original JDOM Document and vice versa.
>
> I have been thinking about a complete solution to
> this problem. I couldn't find any posting on the mailing
> list about my proposal and thus I hope that I'm not
> wasting your time.
> I couldn't find anything about it in the TODO either.
>
> What about creating a W3C DOM implementation with
> a JDOM document as the underlying storage format?
> A W3C Document should be created with a JDOM Document,
> a W3C Element should be created with a JDOM Element and so on.
> In this way you can pass your JDOM document to an API that
> requires a W3C DOM and the changes to the DOM
> will immediately be reflected in the JDOM document.
> Of course the W3C DOM Adapter must still be created,
> but a conversion the other way around is no longer necessary.
>
> Also we will have an answer to the everlasting questions about
> compatibility of JDOM without messing up the clean interface
> of JDOM.  My adapter proposal is of course more useful for
> compatibility than the current outputters and inputters.
>
> Do you like my proposal? Is it a useful addition to JDOM?
> Are there major problems when this would be implemented
> and included in JDOM?
>
> A nice package name would for example be org.jdom.w3c.
> This new adapter shouldn't be a replacement for the
> existing Outputters and Inputtters.
>
> If you like my proposal I could create a first implementation
> to give it a start.
>
> Greetings,
> --
> Martin Bravenboer
> The Netherlands
>
> _______________________________________________
> 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