You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Dumindu Pallewela <du...@wso2.com> on 2007/01/10 12:45:21 UTC
bug in axiom_element_find_namespace?
When i call axiom_element_find_namespace with parameters uri="urn:def1" and prefix="" for the following xml, it returns the namespace of element <a>. However since <a>'s namespace is not in effect for the element <c>, since element <b> too has a default namespace defined, I suppose this to be a bug. In any case this is the cause for the jira-498.
<a xmlns="urn:def1">
<b xmlns="urn:def2">
<c>
</c>
</b>
</a>
Assuming this a bug, what I think should be changed in axiom_element_find_namespace is to, return NULL if the first default namespace found in searching for the given namespace (say N), is not equivalent to N.
A patch is attached herewith. Please review and apply.
Dumindu.
-- patch:
Index: om_element.c
===================================================================
--- om_element.c (revision 494785)
+++ om_element.c (working copy)
@@ -271,6 +271,8 @@
{
return default_ns;
}
+ else
+ return NULL;
}
/** prefix is null , so iterate the namespaces hash to find the namespace */
for (hashindex = axis2_hash_first(om_ele_impl->namespaces, env);
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org