logo       

XML::LibXML, libxml-2.6.x and AxKit: msg#00071

lang.perl.xml

Subject: XML::LibXML, libxml-2.6.x and AxKit

ad http://rt.cpan.org/NoAuth/Bug.html?id=4518:

I tried to look a bit into the problem. No fix, but maybe my findings
can help to track down the problem.

examples/cb_example.pl works fine with libxml-2.6.3, even if
one changes it to initialize the callbacks like AxKit does:
(the match callback serves as a example for all input callbacks)

$XML::LibXML::match_cb = \&match_uri;

However, this _doesn't_ work within a running AxKit:
Apache::AxKit::Language::LibXSLT::handler() fills the callback-variables
in every run. So in example, $XML::LibXML::match_cb gets set correctly,
one can even get the perlcode out again with Data::Dumper::Deparse.

But no call to LibXML_input_match() ever happens.

xmlRegisterInputCallbacks(...) gets called in LibXML's BOOT only.
(so in the case of mod_perl/AxKit on server startup only)

Between LibXML.xs versions 1.137 and 1.138 (short before CPAN_1_56_0
was tagged) xmlRegisterInputCallbacks(...) along with some other code
got commented out in LibXML_init_parser. Unfortunately, the
corresponding cvs-log message gives little hint why this was done:

----------------------------
revision 1.138
date: 2002/10/24 16:47:15; author: phish; state: Exp; lines: +43 -43


Modified Files:
LibXML.xs perl-libxml-mm.c perl-libxml-sax.c dom.c
code cleanings (mainly type casts)
(no warnings with solaris 8 and cc (!= gcc))
----------------------------

If one re-activates xmlRegisterInputCallbacks(...) in LibXML_init_parser,
callbacks _work_ again with AxKit and libxml-2.6.3.

I have no idea how and why this worked with libxml- <= 2.5.11, maybe its
related to a commit to xmlIO.c short before 2.6.0-beta2:
http://cvs.gnome.org/bonsai/cvsview2.cgi?diff_mode=context&whitespace_mode=show&file=xmlIO.c&branch=&root=/cvs/gnome&subdir=libxml2&command=DIFF_FRAMESET&rev1=1.116&rev2=1.117

Regards
Hansjörg


summary of versions used:
+ libxml-2.6.3 (--without-threads)
+ XML-LibXML cvs HEAD
+ xml-axkit cvs HEAD
+ Apache/1.3.29 mod_perl/1.28
+ Summary of my perl5 (revision 5.0 version 8 subversion 2) configuration:
Platform:
osname=freebsd, osvers=5.1-release-p10, archname=i386-freebsd
uname='freebsd botch.catbull.com 5.1-release-p10 freebsd 5.1-release-p10 #9:
sat oct 4 21:49:38 cest 2003
haensel@xxxxxxxxxxxxxxxxx:usrsrcsysi386compilebotch i386 '
...
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
...


--
IT Services
University of Innsbruck

Attachment: pgpLPuyCLGLfi.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise