RE: [xml-dev] JDOM vs. JAXP/Xerces for XML document creation
by Philippe Le Hegaret other posts by this author
Jul 16 2002 9:36PM messages near this date
RE: [xml-dev] JDOM vs. JAXP/Xerces for XML document creation
|
Re: [xml-dev] JDOM vs. JAXP/Xerces for XML document creation
On Tue, 2002-07-16 at 17:17, Michael Kay wrote:
> > In practice JDOM code is *much* more
> > > portable across parsers than DOM implementations are. I have yet to
> > > be able to run a significant DOM program on two different DOM
> > > implementations (in Java) without debugging and rewriting
> > some code,
> > > even in those parts that are allegedly standard.
> >
> > Was it due to differences in interpretation of the
> > specifications, bugs in the implementations, or differences
> > between your interpretation and the implementation
> > interpretation?
>
> My experience of DOM is that there are lots of nasty subtle differences
> between implementations, for example in the handling of namespaces, the
> handling of entity references, and many other details. Usually when I go
> and check the spec it doesn't tell me which behavior is right, at least
> not without a week of study.
To be honest, handling of namespaces is not an easy thing, especially
when dealing with non-namespace aware and namespace aware nodes like it
is in the DOM. Namespaces handling is the part who took the most of our
time when we worked on DOM Level 2. Obviously, it was not enough since
we are still spending time on it in DOM Level 3. With the emergence of
qname in attribute values and targetNamespace attributes, the developer
will continue to struggle with them. Having said that, I don't expect
users to spend a week of study on the DOM Core specification in order to
understand the DOM namespaces handling, especially with the section on
XML Namespaces and, as it is recommended, "The DOM Level 2 does not
support any mechanism to resolve namespace prefixes. For all of these
reasons, use of such entities and entity references should be avoided or
used with extreme care".
Philippe
-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org> , an
initiative of OASIS <http://www.oasis-open.org>
The list archives are at http://lists.xml.org/archives/xml-dev/
To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>
Thread:
Elliotte Rusty Harold
Philippe Le Hegaret
Elliotte Rusty Harold
Michael Kay
Philippe Le Hegaret
Mike Champion
Elliotte Rusty Harold
|