Resending with the correct prefix.

Dumindu.

-------- Original Message --------
Subject:        bug in axiom_element_find_namespace?
Date:   Wed, 10 Jan 2007 17:15:21 +0530
From:   Dumindu Pallewela <[EMAIL PROTECTED]>
To:     Apache AXIS C Developers List <[email protected]>



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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to