Skip Menu |
 

This queue is for tickets about the XML-LibXML CPAN distribution.

Report information
The Basics
Id: 123
Status: resolved
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: bruce.miller [...] nist.gov
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.31
Fixed in: (no value)

Attachments


Subject: Directory option to parse-file, parse-fh
Download (untitled) / with headers
text/plain 783b
Hi Matt; Thanks for including the extension to the directory option to the parsers. Unfortunately, a few lines later, the previous code is undoing the effect. This patch (against LibXML.xs CVS 1.61) removes them. Also, I get different behaviour processing XIncludes depending on which method I use. It seems to boil down to whether LibXML_init_parser gets called with or w/o a self; I'm suspecting that XML_LIBXML_EXT_DTD and XML_LIBXML_EXPAND_ENTITIES are defaulting to off when self is passed in, but that those are not the `global defaults' that are in effect when there is no self (ie. when you call $doc->process_xinclude() ) [Ie. the latter `works' as expected, but the other xincludes require setting those options on the parser] [[ Does this make any sense? ]] Thanks
Download LibXML.patch
text/x-diff 1.4k
*** LibXML.xs.orig Tue Jan 8 10:59:32 2002 --- LibXML.xs Tue Jan 8 11:01:35 2002 *************** *** 775,781 **** } else { STRLEN n_a; - SV * newURI = newSVpvf("unknown-%12.12d", real_dom); # ok check the xincludes item = hv_fetch( real_obj, "XML_LIBXML_EXPAND_XINCLUDE", 26, 0 ); if ( item != NULL && SvTRUE(*item) ) { --- 775,780 ---- *************** *** 783,790 **** xmlXIncludeProcess(real_dom); } - real_dom->URL = xmlStrdup(SvPV(newURI, n_a)); - SvREFCNT_dec(newURI); proxy = make_proxy_node( (xmlNodePtr)real_dom ); RETVAL = sv_newmortal(); sv_setref_pv( RETVAL, (char *)CLASS, (void*)proxy ); --- 782,787 ---- *************** *** 821,827 **** } else { STRLEN n_a; - SV * newURI = newSVpvf("unknown-%12.12d", real_dom); HV* real_self = (HV*)SvRV(self); SV** item; # ok check the xincludes --- 818,823 ---- *************** *** 829,836 **** if ( item != NULL && SvTRUE(*item) ) xmlXIncludeProcess(real_dom); - real_dom->URL = xmlStrdup(SvPV(newURI, n_a)); - SvREFCNT_dec(newURI); proxy = make_proxy_node( (xmlNodePtr)real_dom ); RETVAL = sv_newmortal(); --- 825,830 ----
Download (untitled) / with headers
text/plain 878b
Patch applied. Thanks! [guest - Tue Jan 8 11:30:27 2002]: Show quoted text
> Hi Matt; > Thanks for including the extension to the directory option to > the parsers. Unfortunately, a few lines later, the previous > code is undoing the effect. This patch (against LibXML.xs CVS 1.61) > removes them. > > Also, I get different behaviour processing XIncludes depending > on which method I use. It seems to boil down to whether > LibXML_init_parser gets called with or w/o a self; > I'm suspecting that XML_LIBXML_EXT_DTD and XML_LIBXML_EXPAND_ENTITIES > are defaulting to off when self is passed in, but that those > are not the `global defaults' that are in effect when there > is no self (ie. when you call $doc->process_xinclude() ) > [Ie. the latter `works' as expected, but the other xincludes require > setting those options on the parser] > [[ Does this make any sense? ]] > Thanks


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.