matts 2005/08/10 05:21:56
Modified: lib/Apache/AxKit Provider.pm
lib/Apache/AxKit/Language LibXSLT.pm
Log:
Fix for: get_dom tries to use $r->pnotes('xml_string') even when it is
called for stylesheets
(Moe)
Revision Changes Path
1.24 +4 -5 xml-axkit/lib/Apache/AxKit/Provider.pm
Index: Provider.pm
===================================================================
RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Provider.pm,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- Provider.pm 9 Aug 2005 17:50:35 -0000 1.23
+++ Provider.pm 10 Aug 2005 12:21:55 -0000 1.24
@@ -159,7 +159,7 @@
}
sub get_dom {
- my $self = shift;
+ my ($self, $str) = @_;
require Apache::AxKit::LibXMLSupport;
AxKit::Debug(8, "Provider::get_dom");
@@ -173,8 +173,7 @@
my $r = $self->apache_request();
my $xml_doc;
- my $str;
- if($str = $r->pnotes('xml_string')) {
+ if ($str) {
use bytes;
AxKit::Debug(8, "Provider::get_dom/parse_string($str, ",
$self->get_document_uri(), ")");
$xml_doc = $parser->parse_string($str, $self->get_document_uri()) ||
@@ -190,7 +189,7 @@
if ($@) {
use bytes;
my $xmlstring = ${$self->get_strref()};
- AxKit::Debug(8,
"Provider::get_dom/parse_string($xmlstring, ", $self->get_document_uri(), ")");
+ AxKit::Debug(8,
"Provider::get_dom/parse_strref($xmlstring, ", $self->get_document_uri(), ")");
$xml_doc = $parser->parse_string($xmlstring,
$self->get_document_uri()) ||
throw Apache::AxKit::Exception::Error(
-text => "XML::LibXML->parse_string
returned nothing!"
1.24 +2 -2 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.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- LibXSLT.pm 14 Jul 2005 18:43:34 -0000 1.23
+++ LibXSLT.pm 10 Aug 2005 12:21:56 -0000 1.24
@@ -107,7 +107,7 @@
if (!$stylesheet || ref($stylesheet) ne 'XML::LibXSLT::Stylesheet') {
reset_depends();
- my $style_uri = $style->apache_request->uri();
+ my $style_uri = $style->get_document_uri();
AxKit::Debug(7, "[LibXSLT] parsing stylesheet $style_uri");
my $style_doc = $style->get_dom();