On Tue, 06 Jun 2006 21:52:37 +0100, Doug Bryant <[EMAIL PROTECTED]>  
wrote:

> Ross,
>
> I ran across xml-smarty today.  It is also based on libxml and the author
> seems to have solved the cross document node copying issue.
>
> xml-smarty's license is lgpl rather than the MIT license, but I believe  
> it
> is legal to look and see how things are done as long as you don't  
> directly
> copy the code.  Then again, I am no lawyer :)
>
> http://raa.ruby-lang.org/project/ruby-xml-smart/
>
> I hope this is of some help.
>

Yeah, I've looked into XML-Smart on more than one occasion to see how  
things are done ;) On this occasion, though, there's not a great deal of  
difference in the way we're doing things - I think this problem is more  
rooted in the mixture of data pointers and pointers to data pointers  
floating around inside the Ruby XML::Node instances, which comes from,  
well, pretty much everywhere :)

I wrote up a non-ruby test for the xmlDocCopyNode idea I previously  
suggested, and found that without copying the node first I saw the same  
problem as with the extension, but by copying first the problem went away,  
and valgrind gave a clean leak-check. XML-Smart makes do with xmlCopyNode  
to handle this, but still I feel sure we need to look deeper at the way  
we're handling those pointer nodes.

-- 
Ross Bamford - [EMAIL PROTECTED]
_______________________________________________
libxml-devel mailing list
libxml-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/libxml-devel

Reply via email to