I've recently had cause to use Apache subrequests using "$r->lookup_file". Unfortunately this causes AxKit to be unable to find the XSLT for my target file. This patch fixes that.

Jason Adams
Index: lib/AxKit.pm
===================================================================
RCS file: /home/cvspublic/xml-axkit/lib/AxKit.pm,v
retrieving revision 1.54
diff --unified -r1.54 AxKit.pm
--- lib/AxKit.pm        4 Nov 2004 16:50:27 -0000       1.54
+++ lib/AxKit.pm        27 Apr 2005 13:43:59 -0000
@@ -732,10 +732,18 @@
         my $num_left = @$styles;
         my $output_to_browser = ($num_left == 0 && !$no_output);
 
-        my $styleprovider = Apache::AxKit::Provider->new_style_provider(
-                $r,
-                uri => $style->{href},
-                );
+        my $styleprovider;
+        if($r->uri()=~/^INTERNALLY GENERATED/) {
+            $styleprovider = Apache::AxKit::Provider->new_style_provider(
+                    $r,
+                    file => $style->{href},
+                    );
+        } else {
+            $styleprovider = Apache::AxKit::Provider->new_style_provider(
+                    $r,
+                    uri => $style->{href},
+                    );
+        }
 
         $r->notes('resetstring', 1);
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to