commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <Joerg.Schai...@Elsag-Solutions.com>
Subject RE: [Configuration] Standard DOM ?
Date Wed, 03 Mar 2004 12:54:05 GMT
Hi OLiver,

Oliver Heger wrote on Wednesday, March 03, 2004 1:26 PM:
> The classes that load configuration data from XML files
> internally all
> make use of dom4j. I am not sure what you mean with support
> for w3c DOM.

well, I would like to use XML configuration without the need for DOM4J, since JDK 1.4 comes
with anything necessary. I realize, that configuration is pre JDK 1.4 code, but it completely
lacks of the "standard" DOM.
 
> There is a class named ConfigurationXMLDocument that allows
> to treat a
> Configuration object as a source of SAX events. IIRC this
> class also has
> a method that converts a Configuration into a w3c document, but under
> the hood it also uses dom4j. 
> 
> Unfortunately the ConfigurationXMLDocument class has been accidently
> dropped when [configuration] moved from sandbox to proper. There is a
> patch pending that adds this class again. If you are
> interested in this
> class, you can have a look in CVS view:
> 
http://cvs.apache.org/viewcvs.cgi/jakarta-commons-sandbox/configuration/src/java/org/apache/commons/configuration/Attic/ConfigurationXMLDocument.java?view=markup

Well, this is not what I would like to have, again because of the dom4j dependency. I already
have a HierarchicalDOMConfiguration that is based on the w3c classes only. I just took the
code from HierarchicalDOM4JConfiguration and replaced the relevant parts. The same could be
done for a DOMConfiguration. To complete the DOM support a <dom> tag could be supported
by the factory. Also the factory could be refactored so that the most functionality is in
an abstract base class and the derived classes would add the supported tags. ConfigurationFactory
would support anything contained in the configuration package (= backward compatibility) and
the user could create his own factory with the elements he would like to use (and their dependencies).
Additionally this would allow user-defined Configuration classes or the support of DatabaseConfiguration
in the factory.

What do you think? 

Regards,
Jörg

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message