[jdom-interest] Toward beta 9

Elliotte Rusty Harold elharo at metalab.unc.edu
Wed Apr 9 19:34:37 PDT 2003


At 4:16 PM -0400 4/9/03, Rolf Lear wrote:

Basic principal: Current scheme is to build the JDOM representation 
using a JDOMFactory. This is implemented by the DefaultJDOMfactory. 
This factory creates "standard/Verified" Elements, Attributes, etc. I 
create an alternate factory, the "LaxJDOMFactory" which creates 
LaxElements, LaxAttributes, etc. LaxElement extends Element, 
overriding ONLY THE CONSTRUCTOR, so that Verification does not happen 
ONLY ON CONSTRUCTION

The problem is that new Elements, Attributes, etc. can still be 
constructed even if the old ones can't be set.

The real problem here is either that Java doesn't have friend 
functions or that SAXBuilder is not in the org.jdom package 
(depending on your point of view). That's why in XOM I made sure that 
Builder and Serializer were in the core package, so they'd have 
access to the internals of classes like Elements. I'd seen how much 
trouble the separate packages for input and output were causing JDOM.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|           Processing XML with Java (Addison-Wesley, 2002)          |
|              http://www.cafeconleche.org/books/xmljava             |
| http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA  |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+



More information about the jdom-interest mailing list