cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <>
Subject Re: DOMUtils
Date Tue, 07 Sep 2010 18:00:09 GMT
On Saturday 04 September 2010 8:10:35 am Benson Margulies wrote:
> I've just noticed two traps waiting to bite CXF developers.
> 1. The MapNamespaceContext does not implement the rules for 'xml' and
> 'xmlns'.
> 2. The DOMUtils seems to me to be rather confused between the effective
> namespace of an element and the declared namespace of an element.
> In a document like:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?><doc
> xmlns="urn:some-namespace"><ele xmlns=""/></doc>
> Node.getNamespaceURI() can return null for that inner element.

Isn't that correct?   That said, I do hate a bunch of things about the DOM api 
with default namespaces and such.   Some require null, others accept the empty 
string, etc...   In general, Stax is the same way.  That's why there are a lot 
of StringUtils.isEmpty(str) type calls and such to map things semi 

That said, for the most part, I hate much of DOMUtils as well.  For any 
parsing things, I've been trying to switch things over to the StaxUtils.   I'd 
like DOMUtils to just be a few of the generic DOM lookup things.

> I don't think we're calling most of the stranger functions in here. Absent
> objections, I will remove questionable functions which are never called.

Please do.

Daniel Kulp

View raw message