-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ross Bamford wrote:
> On Fri, 14 Apr 2006 13:24:41 +0100, zdennis <[EMAIL PROTECTED]> wrote:
> 
> 
>>A while back you posted:
>>    
>> http://rubyforge.org/pipermail/libxml-devel/attachments/20051230/778cd254/libxml-x.obj
>>
>>And I know Mark VanHolstyn posted some pure-ruby stuff with his patches  
>>also. Will this ruby-addition to the api be included with
>>ruby-libxml distribution? If not, I want to petition that it is, even if  
>>it's not included by "require 'libxml'" be default, it
>>would be nice to say "require 'libxml/ext'" or something, because the  
>>functionality (although some is not apart of the libxml
>>binding itself, is really nice to have, and it would make upgrading  
>>libxml versions so much easier.
>>
> 
> 
> I'm not sure whether we'll be including an additional ruby library but I  
> am planning to implement most of the points suggested in those prototypes  
> directly in C. As I mentioned in my post a moment ago, I've today brought  
> Enumerable into play on Node::Set and XPath and am hoping to get C-side  
> each-xxxx methods on the Node / Attr / etc. before this week's out.
> 
> I'll admit at this point that I've not deeply studied the additions Mark  
> made in the ruby code, so I may well 180 on this 'not including ruby code'  
> in the near future :->

The ruby stuff I am thinking of are just helpers/wrappers onto of the 
ruby-libxml bindings. Some of the changes that Mark has in
his xml_node_set.rb file are just things that make a nicer interface to 
ruby-libxml, but don't require it to be in C. For example:

- --------
class XML::Node::Set
        def empty?
                self.length <= 0
        end
        
        def first
                self.each { |n| return n }
        end
end

class XML::Node( *args )
        def first
                arr = self.find( args )
                return arr.first if arr and not arr.empty?
                nil
        end
end
- --------

I know Daniel Berger is currently porting alot of his win32-utils to ruby 
because it is becoming to cumbersome to maintain and
develolp it all in C. It seems same approach should apply with libxml. It is 
easier to add things in ruby to help make the
interface of libxml more friendly and usable if performance isn't an issue, 
like in the above example.

I am thinking outloud here, and thinking it would be easier for people to 
submit things to, since not everyone needs to dabble in C.

Thoughts?

Zach
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEP75lMyx0fW1d8G0RAnoQAJ0RGO8SJZNbO01rE5OssIrzCa0TjQCfdQ9P
us5Uv/qOjw3z1lT4oXoP8z4=
=vWP9
-----END PGP SIGNATURE-----
_______________________________________________
libxml-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/libxml-devel

Reply via email to