Patch applied, svn #219. Note that 'p' of the .find result will not  
result in the xml segment that it used to in 0.3.8. The .find now  
returns an XPath::Object type and it has no to_s method defined. You  
can get the same effect by using .to_a on XPath::Object.

I had not looked closely enough at this code segment when I  
encapsulated the the namespace recursion. Thanks for the patch. You  
have credit in the svn log.

Dan

On Nov 27, 2007, at 08:39, keisuke fukuda wrote:

> So, this should be the patch.
>
> Index: ext/xml/ruby_xml_xpath.c
> ===================================================================
> --- ext/xml/ruby_xml_xpath.c    (revision 218)
> +++ ext/xml/ruby_xml_xpath.c    (working copy)
> @@ -76,9 +76,9 @@
>      }
>      else {
>        // tuples of prefix/uri
> -      if (RARRAY(RARRAY(nslist)->ptr[i])->len == 2) {
> -       rprefix = RARRAY(RARRAY(nslist)->ptr[i])->ptr[0];
> -       ruri = RARRAY(RARRAY(nslist)->ptr[i])->ptr[1];
> +      if (RARRAY(nslist)->len == 2) {
> +       rprefix = RARRAY(nslist)->ptr[0];
> +       ruri = RARRAY(nslist)->ptr[1];
>         ruby_xml_xpath_context_register_namespace(xxpc, rprefix,  
> ruri);
>        } else {
>         rb_raise(rb_eArgError, "nested array must be an array of
> strings, prefix and href/ 
> uri");<xpath_ns_fix.patch.txt>________________________________________ 
> _______
> libxml-devel mailing list
> libxml-devel@rubyforge.org
> http://rubyforge.org/mailman/listinfo/libxml-devel

_______________________________________________
libxml-devel mailing list
libxml-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/libxml-devel

Reply via email to