You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axkit-dev@xml.apache.org by "Alexey A. Ukhov" <au...@startext.de> on 2006/08/26 18:43:25 UTC
AxKit from trunk (rev. 437177) doesn't work
Hello friends.
It looks that you forgot to replace some links to old library
(LibXMLSupport).
medlib# svn diff
Index: lib/Apache/AxKit/Language/LibXSLT.pm
===================================================================
--- lib/Apache/AxKit/Language/LibXSLT.pm (revision 437177)
+++ lib/Apache/AxKit/Language/LibXSLT.pm (working copy)
@@ -66,7 +66,7 @@
my $parser = Apache::AxKit::LibXML->new();
$parser->expand_entities(1);
$parser->expand_xinclude(1);
- local $Apache::AxKit::LibXMLSupport::provider_cb =
+ local $Apache::AxKit::LibXMLCallbacks::provider_cb =
sub {
my $r = shift;
my $provider =
Apache::AxKit::Provider->new_content_provider($r);
@@ -110,7 +110,7 @@
my $xslt = XML::LibXSLT->new();
$xslt->input_callbacks(
Apache::AxKit::LibXMLCallbacks->input_callbacks() );
- local $Apache::AxKit::LibXMLSupport::provider_cb =
+ local $Apache::AxKit::LibXMLProviders::provider_cb =
sub {
my $r = shift;
my $provider =
Apache::AxKit::Provider->new_style_provider($r);
Index: lib/Apache/AxKit/Provider.pm
===================================================================
--- lib/Apache/AxKit/Provider.pm (revision 437177)
+++ lib/Apache/AxKit/Provider.pm (working copy)
@@ -161,7 +161,8 @@
sub get_dom {
my ($self, $str) = @_;
- require Apache::AxKit::LibXMLSupport;
+ require Apache::AxKit::LibXML;
+ require Apache::AxKit::LibXMLCallbacks;
AxKit::Debug(8, "Provider::get_dom");
my $parser = Apache::AxKit::LibXML->new();
Best regards,
Alexey A. Ukhov
Re: AxKit from trunk (rev. 437177) doesn't work
Posted by Matt Sergeant <ma...@sergeant.org>.
That, and Alexey's patch both applied. Thanks.
On 18-Sep-06, at 9:49 AM, Hansjoerg Pehofer wrote:
> Dahut!
>
> "Alexey A. Ukhov" <au...@startext.de> writes:
> [...]
>> Apache::AxKit::LibXMLCallbacks->input_callbacks() );
>> - local $Apache::AxKit::LibXMLSupport::provider_cb =
>> + local $Apache::AxKit::LibXMLProviders::provider_cb =
> ^^^^^^^^^
> That should be $Apache::AxKit::LibXMLCallbacks, I suspect.
>
> I also had to insert a cleanup_callbacks() call into
> LibXMLCallbacks.pm
> to get rid of spurious global callbacks (set by other apps), which
> come
> into effect in cases the axkit-set, local ones don't.
> (i.e. $uri=~/^(https?|ftp|file):/)
>
> Index: LibXMLCallbacks.pm
> ===================================================================
> --- LibXMLCallbacks.pm (revision 447364)
> +++ LibXMLCallbacks.pm (working copy)
> @@ -10,6 +10,7 @@
> sub input_callbacks {
> my $class = shift;
> my $icb = XML::LibXML::InputCallback->new();
> + $icb->cleanup_callbacks();
> $icb->register_callbacks( [ \&match_uri, \&open_uri,
> \&read_uri, \&close_uri ] );
> return $icb;
>
> Thanks,
> Hansjörg
>
> --
> IT Services University of Innsbruck
> CFB4 D6E7 33F4 34C0 18B9 6661 E355 4337 3F8B D9C2
> http://purl.org/net/hansjoerg.pehofer/public_key
>
AxKit from trunk (rev. 437177) doesn't work
Posted by Hansjoerg Pehofer <ha...@uibk.ac.at>.
Dahut!
"Alexey A. Ukhov" <au...@startext.de> writes:
[...]
> Apache::AxKit::LibXMLCallbacks->input_callbacks() );
> - local $Apache::AxKit::LibXMLSupport::provider_cb =
> + local $Apache::AxKit::LibXMLProviders::provider_cb =
^^^^^^^^^
That should be $Apache::AxKit::LibXMLCallbacks, I suspect.
I also had to insert a cleanup_callbacks() call into LibXMLCallbacks.pm
to get rid of spurious global callbacks (set by other apps), which come
into effect in cases the axkit-set, local ones don't.
(i.e. $uri=~/^(https?|ftp|file):/)
Index: LibXMLCallbacks.pm
===================================================================
--- LibXMLCallbacks.pm (revision 447364)
+++ LibXMLCallbacks.pm (working copy)
@@ -10,6 +10,7 @@
sub input_callbacks {
my $class = shift;
my $icb = XML::LibXML::InputCallback->new();
+ $icb->cleanup_callbacks();
$icb->register_callbacks( [ \&match_uri, \&open_uri,
\&read_uri, \&close_uri ] );
return $icb;
Thanks,
Hansjörg
--
IT Services University of Innsbruck
CFB4 D6E7 33F4 34C0 18B9 6661 E355 4337 3F8B D9C2
http://purl.org/net/hansjoerg.pehofer/public_key