Hello,
Below the text I placed small-small sample.
The logic is that MyProvider should always work because his results is always "NEW".
(mtime returns always new time)
But.... The log was (DebugLevel 2):
----------- [cut]
fast handler called for /ax/a.xml
checking if we process this resource
media: screen, preferred style: #default
getting styles and external entities from the XML
using XS get_styles (libxml2)
Checking dependencies
Use of uninitialized value in numeric gt (>) at
/usr/local/lib/perl5/site_perl/5.8.0/i386-linux/Apache/AxKit/Provider.pm line 104.
delivering cached copy - all conditions met
---------------- [end]
BTW - line 104 of Provider.pm compares content element mtime with current time. In
that place AxKit::Provider object has type AxKit::Provider::File, not MyProvider. Why?
That's bad and I don't know where to find a bug =(
Can someone help?
Also - I want to offer additional behavior to AxDependencyChecks - now it's just ON or
OFF. But will be good to check all CONTENT dependicies skipping STYLE dependencies....
Is that possible?
------------------------------ .htaccess
<Perl>
use lib qw(/path/to/module);
</Perl>
<Files "*.xml">
SetHandler axkit
</Files>
<Files "b">
AxHandleDirs On
SetHandler axkit
AxContentProvider MyProvider
</Files>
AxAddStyleMap text/xsl Apache::AxKit::Language::LibXSLT
AxDebugLevel 2
AxNoCache Off
AxDependencyChecks On
------------------------------- a.xml
<?xml version='1.0'?>
<?xml-stylesheet href="test.xsl" type="text/xsl"?>
<test/>
------------------------------- MyProvider.pm
package MyProvider;
use vars qw/@ISA/;
@ISA = qw(Apache::AxKit::Provider);
my $txt = '<?xml version="1.0"?><p>OK</p>';
sub get_fh {
throw Apache::AxKit::Exception::IO( -text => "Can't" );
}
sub process { return 1; }
sub key { return 'mykey'; }
sub mtime { return time + 100; }
sub get_strref { return \$txt; }
1;
-------------------------------------- test.xsl
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match='/'>
<xsl:copy-of select='document("b")'/>
</xsl:template>
</xsl:stylesheet>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]