This is not quite strictly speaking an AxKit question, but here goes...
I have an application in which I instantiate an XML::LibXSLT processor
within Apache, register some perl callbacks, and
call them.
This works fine for returning scalars, but if I return an
XML::LibXML::NodeList object tragedy strikes!
Specifically the callback code is thus:
sub attributes : CallBack(attributes)
{
get_logger()->debug("ATTRIBUTES WAS CALLED");
my $df = XML::LibXML::NodeList->new();
for my $key (keys %{get_session_handler()->session()})
{
get_logger()->debug("key is $key");
my $e = XML::LibXML::Element->new('key');
$e->setAttribute('name',$key);
$e->appendText(get_session_handler()->session()->{$key});
$df->push($e);
}
use Data::Dumper;
get_logger()->debug("NODE LIST IS : ".Dumper($df));
return $df;
}
The callback itself functions correctly and good 'ole D::D shows:
[2005/06/09 19:21:28] DEBUG GEB::TagLibs::Session - NODE LIST IS : $VAR1
= bless( [
bless( do{\(my $o = 145355792)}, 'XML::LibXML::Element' ),
bless( do{\(my $o = 144492496)}, 'XML::LibXML::Element' ),
bless( do{\(my $o = 144955968)}, 'XML::LibXML::Element' ),
bless( do{\(my $o = 144956232)}, 'XML::LibXML::Element' )
], 'XML::LibXML::NodeList' );
but thats about all she wrote.
Called from basically any XSLT stylesheet, for example:
<p>dumping all the keys</p>
<xsl:variable name='nodes' select='session:attributes()'/>
<xsl:for-each select='$nodes'>
<xsl:value-of select='.'/>
</xsl:for-each>
(or variations like just a plain <xsl:value-of
select='session:attributes()'/> or wrapping the result in exslt's
node-set() function) simply results in a hung web server process which
chews 100% cpu forever...
Anyone gotten this sort of thing to work?
This is under perl 5.8.5, libxslt 1.1.10, libxml2 2.6.13, XML::LibXML
1.58, XML::LibXSLT 1.57
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]