I have a patch here (attached) that "fixes" the bug that has been found
many times by AxKit users - that <AxStyleName> sections override Processor
definitions outside of those sections, rather than appending to them.
The downside is that the patch may break some existing configurations. If
you depend on this feature (as I said in the mail to axkit-users, with an
example if you need to see the code in question) then you might be annoyed
that it's broken in the next release.
The upside is that if you did rely on this feature, all you now have to do
is wrap that section of your configuration in <AxStyleName "#default"> to
go back to the old functionality.
I just need votes now on whether or not to apply the fix. Can I see a show
of hands?
--
<!-- Matt -->
<:->get a SMart net</:->
Spam trap - do not mail: [EMAIL PROTECTED]
? Makefile
? blib
? AxKit.c
? pm_to_blib
? AxKit-1.51.tar.gz
? AxKit.bs
? AxKit-1.6.tar.gz
? AxKit-1.52.tar.gz
? global_processor.diff
? AxKit-1.6_01.tar.gz
? axkit.org/sidebar_new.xml
? demo/xsp/xincluded.xsp
? demo/xsp/xinclude.xsp
? demo/xsp/green.xsp
? lib/Apache/AxKit/Makefile
? lib/Apache/AxKit/pm_to_blib
? lib/Apache/AxKit/CharsetConv.c
? lib/Apache/AxKit/CharsetConv.bs
Index: axconfig.c
===================================================================
RCS file: /home/cvs/xml-axkit/axconfig.c,v
retrieving revision 1.17
diff -b -u -r1.17 axconfig.c
--- axconfig.c 18 Mar 2003 08:43:40 -0000 1.17
+++ axconfig.c 6 Jul 2003 18:00:21 -0000
@@ -195,7 +195,7 @@
ap_register_cleanup(p, (void*)new->output_transformers, ax_cleanup_av,
ap_null_cleanup);
new->current_styles = newAV();
- av_push(new->current_styles, newSVpv("#default", 0));
+ av_push(new->current_styles, newSVpv("#global", 0));
ap_register_cleanup(p, (void*)new->current_styles, ax_cleanup_av,
ap_null_cleanup);
new->current_medias = newAV();
@@ -701,7 +701,7 @@
}
new->current_styles = newAV();
- av_push(new->current_styles, newSVpv("#default", 0));
+ av_push(new->current_styles, newSVpv("#global", 0));
ap_register_cleanup(p, (void*)new->current_styles, ax_cleanup_av,
ap_null_cleanup);
new->current_medias = newAV();
Index: lib/Apache/AxKit/ConfigReader.pm
===================================================================
RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/ConfigReader.pm,v
retrieving revision 1.15
diff -b -u -r1.15 ConfigReader.pm
--- lib/Apache/AxKit/ConfigReader.pm 18 Mar 2003 08:43:41 -0000 1.15
+++ lib/Apache/AxKit/ConfigReader.pm 6 Jul 2003 18:00:21 -0000
@@ -347,13 +347,14 @@
$style ||= '#default';
- my $list = $self->{cfg}{Processors}{$media}{$style};
+ my $list = $self->{cfg}{Processors}{$media}{'#global'} || [];
+ push @$list, @{ $self->{cfg}{Processors}{$media}{$style} || [] };
my $processors = $self->{apache}->dir_config('AxProcessors');
if( $processors ) {
foreach my $processor (split(/\s*,\s*/, $processors) ) {
my ($pmedia, $pstyle, @processor) = split(/\s+/, $processor);
- next unless ($pmedia eq $media and $pstyle eq $style);
+ next unless ($pmedia eq $media and ($pstyle eq $style or $pstyle eq
'#global'));
push (@$list, [ 'NORMAL', @processor ] );
}
}
@@ -361,7 +362,7 @@
my @processors = $self->{apache}->dir_config->get('AxProcessor');
foreach my $processor (@processors) {
my ($pmedia, $pstyle, @processor) = split(/\s+/, $processor);
- next unless ($pmedia eq $media and $pstyle eq $style);
+ next unless ($pmedia eq $media and ($pstyle eq $style or $pstyle eq
'#global'));
push (@$list, [ @processor ] );
}