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 "Sebastian Brandt (JIRA)" <ji...@apache.org> on 2012/04/30 13:42:48 UTC

[jira] [Created] (AXIS2C-1591) axiom_element_add_attribute and duplicate names

Sebastian Brandt created AXIS2C-1591:
----------------------------------------

             Summary: axiom_element_add_attribute and duplicate names
                 Key: AXIS2C-1591
                 URL: https://issues.apache.org/jira/browse/AXIS2C-1591
             Project: Axis2-C
          Issue Type: Bug
          Components: xml/om
    Affects Versions: 1.7.0
            Reporter: Sebastian Brandt
            Priority: Minor


in axiom_element_add_attribute, the attribute is added to the hash of attributes in om_element->attributes
based on the name (axutil_qname_to_string).
If an attribute with the same name is already in the hash, that entry is overwritten and thus, will never be freed.
This seems to be the case always if several xml nodes have the same namespace - the attribute value itself is not used there, or are 
we just talking namespace attributes here?

I don't even begin to understand what the role of the attributes is, and what happes, if the attributes are stored with different names or such.
For the moment, I will try to create two hashes, one for the attributes that are used, and one for the attributes that just have to be freed. Of course, a list would be enough for the latter.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: c-dev-help@axis.apache.org


[jira] [Commented] (AXIS2C-1591) axiom_element_add_attribute and duplicate names

Posted by "Sebastian Brandt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2C-1591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13272161#comment-13272161 ] 

Sebastian Brandt commented on AXIS2C-1591:
------------------------------------------

A similar situation is with om_element->namespaces.
Although a namespace "override" should not happen conceptually, it does, which results in the first entry not being freed.
See also #AXIS2C-1593 about the background of this "namespace override" with the "xsi" tag.

Sebastian
                
> axiom_element_add_attribute and duplicate names
> -----------------------------------------------
>
>                 Key: AXIS2C-1591
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1591
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: xml/om
>    Affects Versions: 1.7.0
>            Reporter: Sebastian Brandt
>            Priority: Minor
>         Attachments: om_element.c.patch
>
>
> in axiom_element_add_attribute, the attribute is added to the hash of attributes in om_element->attributes
> based on the name (axutil_qname_to_string).
> If an attribute with the same name is already in the hash, that entry is overwritten and thus, will never be freed.
> This seems to be the case always if several xml nodes have the same namespace - the attribute value itself is not used there, or are 
> we just talking namespace attributes here?
> I don't even begin to understand what the role of the attributes is, and what happes, if the attributes are stored with different names or such.
> For the moment, I will try to create two hashes, one for the attributes that are used, and one for the attributes that just have to be freed. Of course, a list would be enough for the latter.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: c-dev-help@axis.apache.org


[jira] [Updated] (AXIS2C-1591) axiom_element_add_attribute and duplicate names

Posted by "Sebastian Brandt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebastian Brandt updated AXIS2C-1591:
-------------------------------------

    Attachment: om_element.c.patch

patch: store attributes with duplicate names in list for freeing later on.
                
> axiom_element_add_attribute and duplicate names
> -----------------------------------------------
>
>                 Key: AXIS2C-1591
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1591
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: xml/om
>    Affects Versions: 1.7.0
>            Reporter: Sebastian Brandt
>            Priority: Minor
>         Attachments: om_element.c.patch
>
>
> in axiom_element_add_attribute, the attribute is added to the hash of attributes in om_element->attributes
> based on the name (axutil_qname_to_string).
> If an attribute with the same name is already in the hash, that entry is overwritten and thus, will never be freed.
> This seems to be the case always if several xml nodes have the same namespace - the attribute value itself is not used there, or are 
> we just talking namespace attributes here?
> I don't even begin to understand what the role of the attributes is, and what happes, if the attributes are stored with different names or such.
> For the moment, I will try to create two hashes, one for the attributes that are used, and one for the attributes that just have to be freed. Of course, a list would be enough for the latter.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: c-dev-help@axis.apache.org