[jdom-interest] W3C - JDOM Adapter Proposal

Martin Bravenboer martin at pandoramix.org
Thu Jun 14 10:04:48 PDT 2001


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





More information about the jdom-interest mailing list