To all,
I'm using the DBI provider example from the AxKit web site to fetch
content from a database, my only problem is that it's also trying to use
the same provider to get the xpathscript stylesheets, as well. But my
stylesheets are saved in the filesystem, not the database, so the
content is never transformed.
Following suggestions on the #AxKit IRC channel I've tried inheriting
my modified provider from Provider::File and calling the superclass's
method whenever the requested file matches /\.xps/ (or xsl). This isn't
working, though, which could mean it either can't work, or I'm doing
something wrong.
Here's a sample of my code:
sub init {
my $self = shift;
my (%p) = @_;
if ($p{uri}) {
# called from :
# process_request ($styleprovider = Apache::AxKit::Provider->new)
# check_resource_mtimes ($ent_provider = ... )
# [...]
$self->{id} = $p{uri};
}
if ($p{file}) {
$self->{id} = $p{file};
}
else {
$self->{id} = $self->{apache}->filename();
}
# Try to make Provider::File handle the call if it's a stylesheet
if ($self->{id} = /\.xps/) {
$self->{_not_concept} = 1;
$self->SUPER::init(%p);
}
}
Suggestions and example code would be both appreciated.
Regards,
Chris Wenham
www.disenchanted.com
signature.asc
Description: This is a digitally signed message part
