You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by Eran Chinthaka <ch...@opensource.lk> on 2006/07/26 12:42:00 UTC

[AXIOM] Probable bug in latest namespace serialization code

Hi,

Seems there is a small bug in the new namespace serialization algorithm.
Think of this scenario.

I declare a default namespace in the root element. And I get hold of the
ns object.
OMNamespace ns = paramElement.declareDefaultNamespace("");

Then I create another element foo, passing the above ns object as the
namespace.
OMElement elem = fac.createOMElement("foo", ns);

This will cause the ns to be declared in the foo element.

Then I add this element as a child of the root element.
paramElement.addChild(elem);

When you print this, you will see two default namespace declarations in
the root element and in the foo element, which IMO a bug.

I added and commented out a test for this in
org.apache.axiom.om.NamespaceTest.testNamespaceProblem6().

I didn't fix it as I do not have a very good knowledge on the new
algorithm. Can Rich or some one please look in to this?

Thanks,
Eran Chinthaka