matts 2003/01/08 09:11:04
Modified: lib/Apache/AxKit/Language LibXSLT.pm Log: Cleanup and better logging/debugging Revision Changes Path 1.15 +13 -8 xml-axkit/lib/Apache/AxKit/Language/LibXSLT.pm Index: LibXSLT.pm =================================================================== RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Language/LibXSLT.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- LibXSLT.pm 5 Jun 2002 23:59:19 -0000 1.14 +++ LibXSLT.pm 8 Jan 2003 17:11:04 -0000 1.15 @@ -119,16 +119,21 @@ my $results = $stylesheet->transform($xml_doc, @params); - if ($last_in_chain && $XML::LibXSLT::VERSION >= 1.03) { - my $encoding = $stylesheet->output_encoding; - my $type = $stylesheet->media_type; - $r->content_type("$type; charset=$encoding"); + AxKit::Debug(7, "[LibXSLT] transformation finished, creating $results"); + + if ($last_in_chain) { + AxKit::Debug(8, "[LibXSLT] outputting to \$r"); + if ($XML::LibXSLT::VERSION >= 1.03) { + my $encoding = $stylesheet->output_encoding; + my $type = $stylesheet->media_type; + $r->content_type("$type; charset=$encoding"); + } + $stylesheet->output_fh($results, $r); } - $stylesheet->output_fh($results, $r) if $last_in_chain; - + AxKit::Debug(7, "[LibXSLT] storing results in pnotes(dom_tree) ($r)"); $r->pnotes('dom_tree', $results); - + # warn "LibXSLT returned $output \n"; # print $stylesheet->output_string($results); return Apache::Constants::OK;