+1.

Glen Daniels wrote:
Hi all:

Currently OMElement.getChildrenWithName(QName) uses the OMChildrenQNameIterator to walk the list of children and return matches. Here's the problem - if there is no namespace (or no localName... luckily that part isn't possible), the iterator will happily match ANY element with a matching localName. So for instance when we do this:

config_element.getChildrenWithName(new QName("transportSender"))

We'll get both <axisCfg:transportSender> and <extension:transportSender>. This is bad. The above API call SHOULD only match <transportSender> in no namespace.

XML is namespace-aware, and our code should be too. I'm going to change getChildrenWithName() to match using QName.equals().

If people really want a localname-only match, we can add something like OMElement.getChildrenWithLocalName(String), but it should be an explicitly different API.

Thoughts?

--Glen

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Sanjiva Weerawarana, Ph.D.
Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
Director; Open Source Initiative; http://www.opensource.org/
Member; Apache Software Foundation; http://www.apache.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to