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

Ross Bamford wrote:
> On Wed, 12 Apr 2006 19:02:24 +0100, zdennis <[EMAIL PROTECTED]> wrote:
> 
> 
>>Do you like the idea of doing callbacks on specific node types? This  
>>should be possible with the SAXParser I would assume..but
>>maybe I am wrong?
>>
> 
> 
> Libxml2's SAX parser doesn't (AFAIK?) support this directly, and my  
> feeling is that we should stick to the thin wrapping plan to maintain  
> speed for those that don't need that functionality. It would be pretty  
> easy to implement node-typed callbacks on top of the basic API I guess,  
> which might be something worth considering either within this project or  
> in an external one...
> 
> In the end I went with the method-taking-block API you suggested (i.e. I  
> figured out how to do it from C :)), right now the API is looking like  
> this (some callbacks remain to be implemented, notably xxxxDecl events):
> 
>   *    parser.on_internal_subset { |name, external_id, system_id| ... } =>  
> nil
>   *    parser.on_is_standalone { || ... } => nil
>   *    parser.on_has_internal_subset { || ... } => nil
>   *    parser.on_has_external_subset { || ... } => nil
>   *    parser.on_start_document { || ... } => nil
>   *    parser.on_start_element { |name, attr_hash| ... } => nil
>   *    parser.on_end_element { |name| ... } => nil
>   *    parser.on_reference { |name| ... } => nil
>   *    parser.on_characters { |chars| ... } => nil
>   *    parser.on_processing_instruction { |target, data| ... } => nil
>   *    parser.on_comment { |msg| ... } => nil
>   *    parser.on_parser_warning { |msg| ... } => nil
>   *    parser.on_parser_error { |msg| ... } => nil
>   *    parser.on_parser_fatal_error { |msg| ... } => nil
>   *    parser.on_cdata_block { |cdata| ... } => nil
>   *    parser.on_external_subset { |name, external_id, system_id| ... } =>  
> nil
> 
> I'll hopefully be committing this later today.

This is awesome!  Keep up the great work!


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.

Thanks for everything thus far!

Zach

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

iD8DBQFEP5SJMyx0fW1d8G0RAvfqAJ9B/kJjYsuhnuR8RHfefENMuIxx7ACdGRBo
pOZvCfYR+Gwx3zynvP6XUiQ=
=nPIG
-----END PGP SIGNATURE-----
_______________________________________________
libxml-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/libxml-devel

Reply via email to