[ 
https://issues.apache.org/jira/browse/AXIS2C-675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570667#action_12570667
 ] 

wtmitchell3 edited comment on AXIS2C-675 at 2/20/08 4:29 AM:
---------------------------------------------------------------

I've updated the attached diff to include two additional changes.

(1) Detach is now included as one of the actions of axiom_node_free, when the 
node still has a parent.  All the appropriate points in Axis have been changed 
to take advantage of this.  This allows the free process to perform an internal 
detach that avoids preserving the integrity of namespace references.

(2) When a node is detached, it determines all the namespaces in its parents 
that may be inscope for it or its children.  The new action is then to scan the 
subtree to determine which of these namespaces are actually referenced in the 
subtree, and to redeclare only the namespaces that are actually referenced.  

Senaka, I think that (2) resolves most of your concern about increasing the 
size of the payloads with unused namespace declarations, at the cost of 
scanning the subtree during detach.  I do have a clever idea of something that 
could be done during attach, to further address your payload size concern 
without modifying all the namespace reference values.  We could promote the 
declared namespaces up the tree to a higher parent, detecting if the namespace 
has already been declared at the higher node.  This would eliminate multiple 
declarations when multiple detached subtrees are attached to a new tree.  I'm 
reluctant to implement this, though, as it would make no difference in the case 
with which I'm familiar of the generated adb stubs.  The adb classes serialize 
the pieces of the request message directly, without first collecting them into 
one tree via attach, so repetitive namespace declarations in multiple passed 
request objects would not be removed.   

This diff is relative to the head.  I will be working on the discussed 
axiom_node_copy method separately so it can be on a branch.

      was (Author: wtmitchell3):
    I've updated the attached diff to include two additional changes.

(1) Detach is now included as one of the actions of axiom_node_free, when the 
node still has a parent.  All the appropriate points in Axis have been changed 
to take advantage of this.  This allows the free process to perform an internal 
detach that avoids preserving the integrity of namespace references.

(2) When a node is detached, it determines all the namespaces in its parents 
that may be inscope for it or its children.  The new action is then to scan the 
subtree to determine which of these namespaces are actually referenced in the 
subtree, and to redeclare only the namespaces that are actually referenced.  

Senaka, I think that (2) resolves most of your concern about increasing the 
size of the payloads with unused namespace declarations, at the cost of 
scanning the subtree during detach.  I do have a clever idea of something that 
could be done during attach, to further address your payload size concern 
without modifying all the namespace reference values.  We could promote the 
declared namespaces up the tree to a higher parent, detecting if the namespace 
has already been declared at the higher node.  This would eliminate multiple 
declarations when multiple detached subtrees are attached to a new tree.  I'm 
reluctant to implement this, though, as it would make no difference in the case 
with which I'm familiar of the generated adb stubs.  The adb classes serialize 
the pieces of the request message directly, without first collecting them into 
one tree via attach, so repetitive namespace declarations in multiple passed 
request objects would not be removed.   
  
> 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
>            Assignee: Bill Mitchell
>         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]

Reply via email to