EDOM is a freely-available Eiffel binding an implementation of the World-Wide-Web Consortium's Document Object Model. It supports the following DOM modules:
The initial implementation is based upon Apache Xerces C++ 2.2.0. This features validation against both DTDs and W3C XML Schema Definitions.
Support for multiple implementations is present (in principle - I have implemented the proposed DOMImplementationRegistry).
XSLT is also (optionally) supported. As far as I know, there is no standard for invoking an XSLT processor, other than JAXP, so I'm very much feeling my way here. Comments welcome.
The XSLT implementation is Xalan C++ 1.5. This comes with a full set of extension functions, plus parts of the EXSLT library. See the Xalan documentation for details.
Schematron validation is supported (assuming you have installed XSLT support) via Schematron-Basic and XSLT. Schematron rules can also be embedded in W3C XSD schemas (and in RLEAX-NG grammars, but EDOM does not yet do validation with RELAX-NG grammars).
All DOM level 3.0 interfaces are experimental, and liable to change. The XSLT interface is not yet complete.
This release uses the GOBO tools geant and gexace. Despite that, only ISE works at present. I made an attempt at getting it to work with SE. The Eiffel code compiled, but then I was faced with getting the C++ code to compile. Anyway interested in taking on this task, then email me with your sourceforge id. VE doesn't yet support INTEGER_16, so there is more effort involved there.
EDOM is licensed under the Eiffel Forum License v2.0.
Xerces and Xalan are licensed under the Apache Software Foundation's Apache Software License (ASL). So you must additionally conform to this license to use EDOM.
Pathan is licensed under the DecisionSoft Open Source License.
Schematron-Basic is also licensed under the GPL or the Mozilla Public License (MPL).
The library code is heavily documented (so generate short forms). The test programs should show how to use EDOM.
Since the DOM is defined using CORBA idl, I thought it appropriate to use the same names that MICO/E would generate from the idl files.
The test programs are in the EDOM root directory. The library is packaged into the following directories:
Each of the DOM module directories consist largely of deferred classes (the registry, and some facility classes are exceptions). Each one has a xercesc sub-directory, which contains the Xerces C++ implementation of those interfaces. The xslt directory has a xalanc sub-directory for the Xalan C++ implementation. This is nowhere near working yet.
Unless stated otherwise, interfaces have not been tested.
Interface | Status | Reason |
---|---|---|
DOMException | Fully implemented and tested. | |
DOMImplementationSource | Fully implemented. | |
DOMImplementation | Fully implemented. | |
DocumentFragment | Fully implemented. | |
Document | Fully implemented. | |
Node | Fully implemented | getUserData and setUserData have wrong signature. |
NodeList | Fully implemented and tested. | |
NamedNodeMap | Fully implemented. | |
CharacterData | Fully implemented. | |
Attr | Fully implemented. | |
Element | Fully implemented. | |
Text | Fully implemented. | |
Comment | Fully implemented. | |
UserDataHandler | Programmer implements. | Implemented sucessfully as a test. |
DOMError | Mostly implemented. | relatedError is not yet implemented, as Xerces C++ does not implement it. |
DOMErrorHandler | Programmer implements | Implemented succesfully as a test. |
DOMLocator | Fully implemented. | |
CDATASection | Fully implemented. | |
DocumentType | Fully implemented. | |
Notation | Fully implemented. | |
Entity | Fully implemented. | |
EntityReference | Fully implemented. | |
ProcessingInstruction | Fully implemented. |
Interface | Status | Reason |
---|---|---|
DOMSystemException | Implemented. | Although W3C have not yet specified what it should look like. |
DOMImplementationLS | Fully implemented via Xerces C++. All tested except createDOMInputSource. | |
DocumentLS | Not implemented |
Xerces C++ does not implement it (and DOMBuilder/DOMWriter provide this functionality) Could easily be implemented in terms of DOMBuilder plus DOMWriter |
DOMInputSource | Partially implemented |
Xerces C++ implements some of the functionality. To be reviewed. |
LSLoadEvent | Not implemented or even declared (as it depends on events module) |
Xerces C++ does not implement it, as it does not support asynchronous parsing. |
LSProgressEvent | Not implemented or even declared (as it depends on events module) |
Xerces C++ does not implement it, as it does not support asynchronous parsing. |
DOMEntityResolver | Not implemented |
Not implemented - dependent on DOMInputSource. |
DOMBuilderFilter | Implemented, but will not work |
Xerces C++ will throw an exception if you try to set the filter. When Xerces C++ implements this, one change to dom.h is needed (umcomment base class). Hm. Check this - probably not true now. |
ParseErrorEvent | Not implemented or even declared (as it depends on events module) |
Xerces C++ does not implement it. |
DOMBuilder |
Mostly implemented. Tested where implemented. |
parse and parseWithContext depend on DOMInputSource entityResolver attribute depends on DOMEntityResolver filter will not work. |
DOMWriter |
Fully implemented. Fully tested. |
|
DOMWriterFilter |
Programmer implements. |
Implemented sucessfully as a test. |
Interface | Status | Reason |
---|---|---|
NodeFilter | Programmer implements. | Implemented sucessfully as a test. |
NodeIterator | Fully implemented. Partially tested. | |
TreeWalker | Fully implemented. Partially tested. | |
DocumentTraversal | Fully implemented and tested. |
Interface | Status | Reason |
---|---|---|
Range | Fully implemented. Partially tested. | |
RangeException | Fully implemented. | |
RangeExceptionCode | Fully implemented. | |
DocumentRange | Fully implemented and tested. |
All correspondence should be addressed to edom@colina.demon.co.uk
Update to February 2003 working drafts (or whatever) of DOM level 3.0, tracking Xerces C++.
The following are all possible (but by no means promised) future enhancements: