[EMAIL PROTECTED] wrote:
Yes, Samisa, I wrote a shallow copy that used the ref counted attributes, while creating new copies of element and text nodes as these are not ref-counted today. As I wrote it in the context of a C++ application, I need to do some cleanup to make it suitable to be included in the axiom environment. I'll try to work something up that people can comment on. When I thought about it some more, I realized that nothing prevents it from being a complete copy routine, avoiding the ref-counts on the attributes. That just involves a little more execution overhead. Of course, such a copy would still share namespace structures with the original tree. Another interesting thought I had is that even a serialize/deserialize clone implementation has the same difficulty that Kasun raised with detach. If the namespaces were declared at a higher level than the subtree being serialized, then deserialization would fail as the xml structure would refer to namespace prefixes that were not declared. I think that serialization would need essentially the same logic I wrote recently to handle the namespace references in the subtree for detach.

I believe that I have fixed this with the implementation of the serialize_sub_tree method that was done some time back. If you just use serialize, and not serialize sub tree, then this problem would appear.

Thanks,
Samisa...


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to