[
https://issues.apache.org/jira/browse/AXIS2C-675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bill Mitchell updated AXIS2C-675:
---------------------------------
Attachment: diff.txt
The attached diff.txt implements a change to attach all the namespaces in scope
on an element node being detached to the element, so that the detached node and
all its children will still have valid namespace references even if the former
parent tree is freed.
Beyond the obvious change to detach to preserve the namespace, it required
cleaning up several places in om_element that would allow an attribute to be
attached without the namespace structure it pointed to being declared at the
element or one of its parents. The former code seemed to accept that the
namespace uri or prefix was declared somewhere, without requiring that the very
same structure be used. Testing also revealed another anomaly. Now that
guththila behaves like libxml and parses xml:id attributes, with this change
the xml: namespace would be preserved in the detached node. When that
structure was subsequently serialized and passed to a remote system not using
Axis, in particular a system using the Microsoft xml parser, this unnecessary
but allowed xml namespace declaration is diagnosed as an error. So we should
just not emit it on output.
> Detach node does not handle namespaces
> --------------------------------------
>
> Key: AXIS2C-675
> URL: https://issues.apache.org/jira/browse/AXIS2C-675
> Project: Axis2-C
> Issue Type: Bug
> Components: xml/om
> Reporter: Jamie Lyon
> Attachments: diff.txt
>
>
> When detaching a node from a parent, if the current node or any of it's
> children have any namespaces declared in it's parent or above, when the node
> is detached, and the parent freed, any namespace references are lost.
--
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]