[
https://issues.apache.org/jira/browse/WSCOMMONS-230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Saliya Ekanayake updated WSCOMMONS-230:
---------------------------------------
Attachment: attribute-clone-patch.txt
Hi,
I have fixed the problem. Now whenever a user tries to add an OMAttribute which
is already added to another OMElement the attribute is cloned and added. Thus
we can enforce one parent constraint while allowing the user to work as before.
A user who needs to worry about the owner, however, will have to consider the
cloning effect.
The addAttribute(OMAttribute attr) method of OMElementImpl guarantees to return
the attribute that is added to it (this may be different from the attribute
which is given to the method if the given attribute already has an owner). A
user needs to consider this matter only if he/she is tracking the owner of the
attribute in his/her application.
> Method to retrieve the owner element of an OMAttribute instance
> ---------------------------------------------------------------
>
> Key: WSCOMMONS-230
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-230
> Project: WS-Commons
> Issue Type: Improvement
> Components: AXIOM
> Reporter: Saliya Ekanayake
> Priority: Minor
> Attachments: attribute-clone-patch.txt, fixed_omattribute_patch.txt,
> fixed_omattribute_patch_v2.txt, omattribute_patch.txt
>
>
> Providing methods to set and get the owner element of an instance of
> OMAttribute is pretty much useful. An OMAttribute instance is then restricted
> to be added only to a single OMElement instance (DOM Attr has similar
> restriction).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]