On Tue, Sep 03, 2002 at 01:47:33PM +0200, Peter Bouda wrote:
> Hi!
> I got a problem with XSP after upgrading from AxKit 1.5 to 1.6. I use the
> TaglibHelper module to define taglibs, all my functions return xml, so the
> declaration looks something like "my_function():as_xml=1". With AxKit 1.5
> everything was fine, now I got "Internal server errors" and log entries like:
>
> [AxKit] [Error] Empty String at
> /usr/lib/perl5/site_perl/5.6.0/i386-linux/XML/LibXML.pm line 671
>
> when the function returns. After deleting the "as_xml" entry everything is OK.
> Whats wrong? Any changes between the TaglibHelper in 1.5 and 1.6 that I
> missed? I use LibXML 1.52, line 671 is the "parse_xml_chunk" call:
after several requests i made all parser functions croak() on errors in
XML::LibXML. This requires that all parser functions have to be evaled to
catch errors correctly. parsing an empty string is from the view of XML::LibXML
an error. that's why you get an server error there.
a solution would be to change any
$result = $parser->parse_xml_chunk($string)
to
eval { $result = $parser->parse_xml_chunk($string); };
or in case of appendWellBalancedChunk()
eval { $node->appendWellBalancedChunk($chunk); };
i don't think that i should catch the error in appendWellBalancedChunk()
itself, because then one will loose some informations on the application
level.
christian
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]