You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axkit-dev@xml.apache.org by ma...@apache.org on 2003/10/27 01:59:55 UTC

cvs commit: xml-axkit/t/pipeline 03styles.t

mach        2003/10/26 16:59:55

  Modified:    .        Tag: axkit-pipeline-2 MANIFEST
               lib      Tag: axkit-pipeline-2 AxKit.pm
               lib/Apache/AxKit Tag: axkit-pipeline-2 Language.pm
                        Pipeline.pm
               lib/Apache/AxKit/Language Tag: axkit-pipeline-2
                        XPathScript.pm XSP.pm
               lib/Apache/AxKit/Pipeline Tag: axkit-pipeline-2 Head.pm
                        Language.pm XSP.pm
               lib/Apache/AxKit/Provider Tag: axkit-pipeline-2 Scalar.pm
               t/conf   Tag: axkit-pipeline-2 extra.last.conf.in
  Added:       lib/Apache/AxKit Tag: axkit-pipeline-2 PipeCtrl.pm
               lib/Apache/AxKit/Pipeline Tag: axkit-pipeline-2 DoStyles.pm
                        Tail.pm
               lib/Apache/AxKit/Provider Tag: axkit-pipeline-2 DOM.pm
               t/htdocs/pipeline/styles Tag: axkit-pipeline-2 01.xsp
               t/htdocs/style/pipeline/styles Tag: axkit-pipeline-2 01.xsl
               t/pipeline Tag: axkit-pipeline-2 03styles.t
  Log:
  Dynamic adding of styles to pipeline.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.20.2.4  +13 -4     xml-axkit/MANIFEST
  
  Index: MANIFEST
  ===================================================================
  RCS file: /home/cvs/xml-axkit/MANIFEST,v
  retrieving revision 1.20.2.3
  retrieving revision 1.20.2.4
  diff -u -r1.20.2.3 -r1.20.2.4
  --- MANIFEST	22 Oct 2003 21:48:29 -0000	1.20.2.3
  +++ MANIFEST	27 Oct 2003 00:59:54 -0000	1.20.2.4
  @@ -157,13 +157,19 @@
   lib/Apache/AxKit/Provider/FileWrite.pm
   lib/Apache/AxKit/Provider/Filter.pm
   lib/Apache/AxKit/Provider/Scalar.pm
  -lib/Apache/AxKit/Pipeline.pm
  -lib/Apache/AxKit/Pipeline/Trace.pm
  -lib/Apache/AxKit/Pipeline/XSP.pm
  -lib/Apache/AxKit/Pipeline/LibXSLT.pm
  +lib/Apache/AxKit/Provider/DOM.pm
  +lib/Apache/AxKit/PipeCtrl.pm
   lib/Apache/AxKit/Pipeline/Cache.pm
  +lib/Apache/AxKit/Pipeline/DoStyles.pm
  +lib/Apache/AxKit/Pipeline/Head.pm
   lib/Apache/AxKit/Pipeline/Language.pm
  +lib/Apache/AxKit/Pipeline/LibXSLT.pm
   lib/Apache/AxKit/Pipeline/SAX.pm
  +lib/Apache/AxKit/Pipeline/Tail.pm
  +lib/Apache/AxKit/Pipeline/Trace.pm
  +lib/Apache/AxKit/Pipeline/Transformer.pm
  +lib/Apache/AxKit/Pipeline/XSP.pm
  +lib/Apache/AxKit/Pipeline.pm
   lib/Apache/AxKit/StyleChooser/Cookie.pm
   lib/Apache/AxKit/StyleChooser/FileSuffix.pm
   lib/Apache/AxKit/StyleChooser/PathInfo.pm
  @@ -225,4 +231,7 @@
   t/htdocs/style/pipeline/sax
   t/htdocs/style/pipeline/sax/03.xsl
   t/AxKitSaxTest.pm
  +t/htdocs/pipeline/styles/01.xsp
  +t/htdocs/style/pipeline/styles/01.xsl
  +t/pipeline/03styles.t
   typemap
  
  
  
  No                   revision
  No                   revision
  1.53.2.2  +62 -158   xml-axkit/lib/AxKit.pm
  
  Index: AxKit.pm
  ===================================================================
  RCS file: /home/cvs/xml-axkit/lib/AxKit.pm,v
  retrieving revision 1.53.2.1
  retrieving revision 1.53.2.2
  diff -u -r1.53.2.1 -r1.53.2.2
  --- AxKit.pm	20 Oct 2003 20:55:36 -0000	1.53.2.1
  +++ AxKit.pm	27 Oct 2003 00:59:54 -0000	1.53.2.2
  @@ -1,6 +1,6 @@
   package AxKit;
   use strict;
  -use vars qw/$VERSION/;
  +use vars qw/$VERSION $Pipeline/;
   
   use DynaLoader ();
   use UNIVERSAL ();
  @@ -14,7 +14,7 @@
   use Apache::AxKit::Provider::File;
   use Apache::AxKit::Provider::Scalar;
   use Apache::AxKit::CharsetConv;
  -use Apache::AxKit::Pipeline;
  +use Apache::AxKit::PipeCtrl;
   use File::Basename ();
   use Data::Dumper;
   use Compress::Zlib ();
  @@ -181,6 +181,7 @@
            Carp::confess("caught SIGUSR2!");
        };
       
  +	local($AxKit::Pipeline) = Apache::AxKit::PipeCtrl->new();    
       my $rc = $r->status();
       
       $AxKit::Cfg = Apache::AxKit::ConfigReader->new($r);
  @@ -234,6 +235,8 @@
       local $AxKit::Cfg;
       local $AxKit::DebugLevel;
       local $Error::Debug;
  +	local($AxKit::Pipeline) = Apache::AxKit::PipeCtrl->new();
  +
   
   	my $rc = $r->status();
   
  @@ -288,17 +291,17 @@
   #        $AxKit::OrigType = $r->content_type('changeme');
   
           reset_depends();
  -
  +        
   		my $pipeline = build_pipeline($r, $provider, 0);
   		
   		return $pipeline->send($r);
   
           # restore $r
  -#        if (ref($r) eq 'AxKit::Apache') {
  - #           bless $r, 'Apache';
  - #           tie *STDOUT, 'Apache', $r;
  - #       }
  -   };
  +        if (ref($r) eq 'AxKit::Apache') {
  +            bless $r, 'Apache';
  +            tie *STDOUT, 'Apache', $r;
  +        }
  +    };
       my $E = $@;
       unless ($E) {
           return $retcode;
  @@ -400,11 +403,6 @@
       AxKit::Debug(2, "media: $media, preferred style: $preferred");
   
       my $styles = get_styles($media, $preferred, $provider, $r);
  -
  -    # reconsecrate Apache request object (& STDOUT) into our own class
  -
  -#    bless $r, 'AxKit::Apache';
  -#    tie *STDOUT, 'AxKit::Apache', $r;
       
       if (my $charset = $AxKit::Cfg->OutputCharset) {
           AxKit::Debug(5, "Different output charset: $charset");
  @@ -415,85 +413,23 @@
       
       # This is here so that lookup_uri() works on the real thing
       # that we're requesting, not on the thing plus the PATH_INFO
  +
       my $uri = $r->uri();
       my $path_info = $r->path_info();
       substr($uri, -length($path_info)) = '' if length($path_info); # trim off the end that many chars (negative offset to substr)
       $r->uri($uri);
       $ENV{PATH_INFO} = $path_info;
       
  +    $AxKit::Pipeline->add_styles( @$styles );
  +    
   	my ($transformer, $doit) = AxKit::get_output_transformer();
   	my $last_in_chain = !($no_output || $doit || lc($r->dir_config('Filter')) eq 'on' );
  +			
  +	my $pipeline = $AxKit::Pipeline->create_pipeline( $r, $provider, $last_in_chain );
   		
  -	my $pipeline = Apache::AxKit::Pipeline->create_pipeline(
  -		apache 		=> $r, 
  -		provider	=> $provider, 
  -		styles		=> $styles,
  -		lastinchain	=> $last_in_chain
  -	);
  -
   	return $pipeline;
   }	
   
  -#sub run_axkit_engine {
  -#    my ($r, $provider, $no_output) = @_;
  -#    
  -#    # get preferred stylesheet and media type
  -#    my ($preferred, $media) = get_style_and_media();
  -#    AxKit::Debug(2, "media: $media, preferred style: $preferred");#
  -#
  -#    my $styles = get_styles($media, $preferred, $provider, $r);
  -#
  -#    # reconsecrate Apache request object (& STDOUT) into our own class
  -#
  -#    bless $r, 'AxKit::Apache';
  -#    tie *STDOUT, 'AxKit::Apache', $r;
  -#    
  -#    if (my $charset = $AxKit::Cfg->OutputCharset) {
  -#        AxKit::Debug(5, "Different output charset: $charset");
  -#        if (!$r->notes('axkit_passthru_type')) {
  -#            $r->content_type("text/html; charset=$charset");
  -#        }
  -#    }
  -    
  -    # This is here so that lookup_uri() works on the real thing
  -    # that we're requesting, not on the thing plus the PATH_INFO
  -#    my $uri = $r->uri();
  -#    my $path_info = $r->path_info();
  -#    substr($uri, -length($path_info)) = '' if length($path_info); # trim off the end that many chars (negative offset to substr)
  -#    $r->uri($uri);
  -#    $ENV{PATH_INFO} = $path_info;
  -    
  -    # Main grunt of the work done here...
  -#    return process_request( $r, $provider, $styles, $no_output );
  -            
  -#}
  -
  -#sub process_request {
  -#    my ($r, $provider, $styles, $no_output) = @_;#
  -
  -#	my ($transformer, $doit) = AxKit::get_output_transformer();
  -#	my $last_in_chain = !($no_output || $doit || lc($r->dir_config('Filter')) eq 'on' );
  -		
  -#	my $pipeline = Apache::AxKit::Pipeline->create_pipeline(
  -#		apache 		=> $r, 
  -#		provider	=> $provider, 
  -#		styles		=> $styles,
  -#		lastinchain	=> $last_in_chain
  -#	);
  -	 
  -	
  -#	my $str_ref = $pipeline->get_strref( $r, $last_in_chain );	
  -
  -#	my $ret_val = $r->status();
  -	
  -#	AxKit::Debug(5, "pipeline finished with apache status $ret_val");
  -    
  -#    return $str_ref;
  -#}
  -
  -
  -
  -
   sub get_axkit_uri {
       my ($uri) = @_;
       
  @@ -535,6 +471,8 @@
       local $AxKit::Cfg = Apache::AxKit::ConfigReader->new($r);
   
       my $provider = Apache::AxKit::Provider->new_content_provider($r);
  +
  +	local($AxKit::Pipeline) = Apache::AxKit::PipeCtrl->new();
       
       my $pipeline = build_pipeline($r, $provider, 1); # no output;
       
  @@ -599,6 +537,8 @@
   
       my $error = $E->as_xml($r->filename);
   
  +	local($AxKit::Pipeline) = Apache::AxKit::PipeCtrl->new();
  +
       my $provider = Apache::AxKit::Provider::Scalar->new(
               $r, $error, $error_styles
       );
  @@ -606,13 +546,11 @@
       eval {
   		my ($transformer, $doit) = AxKit::get_output_transformer();
   		my $last_in_chain = !( $doit || lc($r->dir_config('Filter')) eq 'on' );
  -		
  -		my $pipeline = Apache::AxKit::Pipeline->create_pipeline(
  -			apache 		=> $r, 
  -			provider	=> $provider, 
  -			styles		=> $error_styles,
  -			lastinchain	=> $last_in_chain
  -		);
  +
  +
  +		$AxKit::Pipeline->add_styles( @$error_styles );
  +			
  +		my $pipeline = $AxKit::Pipeline->create_pipeline( $r, $provider, $last_in_chain );
   	 
   		$pipeline->send($r);
   
  @@ -630,9 +568,43 @@
       return OK;
   }
   
  -sub insert_next_stylesheet { die("Not supported anymore") }
  -sub insert_last_stylesheet { die("Not supported anymore") }
  -sub reset_stylesheets { die("Not supported anymore") }
  +sub insert_next_stylesheet {
  +    my ($type, $href) = @_;
  +    my $mapping = $AxKit::Cfg->StyleMap;
  +    my $module = $mapping->{$type};
  +    if (!$module) {
  +        throw Apache::AxKit::Exception::Declined(
  +            reason => "No implementation mapping available for type '$type'"
  +       	);
  +    }
  +    
  +    $AxKit::Pipeline->add_style(
  +		type 	=> $type,
  +		href 	=> $href,
  +		module 	=> $module,
  +		prepend	=> 1,
  +	);
  +}
  +
  +sub insert_last_stylesheet {
  +    my ($type, $href) = @_;
  +    my $mapping = $AxKit::Cfg->StyleMap;
  +    my $module = $mapping->{$type};
  +    if (!$module) {
  +        throw Apache::AxKit::Exception::Declined(
  +            reason => "No implementation mapping available for type '$type'"
  +            );
  +    }
  +    $AxKit::Pipeline->add_style(
  +		type 	=> $type,
  +		href 	=> $href,
  +		module 	=> $module,
  +	);
  +}
  +
  +sub reset_stylesheets {
  +   $AxKit::Pipeline = Apache::AxKit::PipeCtrl->new();
  +}
   
   sub get_style_and_media {
       my $style = $AxKit::Cfg->PreferredStyle;
  @@ -679,74 +651,6 @@
           return $styles;
       }
   }
  -
  -#sub deliver_to_browser {
  -#    my ($r, $str_ref) = @_;
  -    
  -#	if (ref($r) eq 'AxKit::Apache') {
  -#		bless $r, 'Apache';
  -#		tie *STDOUT, 'Apache', $r;
  -#	}
  -        
  -#    my $result_code = $r->status();
  -        
  -#    AxKit::Debug(4, "delivering to browser");
  -
  -#
  -#    if ($r->content_type eq 'changeme' && !$r->notes('axkit_passthru_type')) {
  -#        $AxKit::Cfg->AllowOutputCharset(1);
  -#        $r->content_type('text/html; charset=' . ($AxKit::Cfg->OutputCharset || "UTF-8"));
  -#    }
  -#    elsif ($r->notes('axkit_passthru_type')) {
  -#        $r->content_type($AxKit::OrigType);
  -#    }
  -
  -#    if (my $charset = $AxKit::Cfg->OutputCharset()) {
  -#        my $ct = $r->content_type;
  -#        $ct =~ s/charset=.*?(;|$)/charset=$charset/i;
  -#        $r->content_type($ct);
  -#    }
  -#	
  -# I've removed all this cause it breaks error documents
  -# 
  -#    if ($result_code != OK && $result_code != 200) {
  -#    	# no caching - probably makes no sense, and will be turned off
  -#        # anyways, as currently only XSP pages allow to send custom responses
  -#    	AxKit::Debug(4,"sending custom response: $result_code");
  -#        my ($transformer, $doit) = get_output_transformer();
  -#        if ($doit) {
  -#            $r->custom_response($result_code,$transformer->( ${$str_ref} ));
  -#        }
  -#        else {
  -#            $r->custom_response($result_code,${$str_ref});
  -#        }
  -#        return $result_code;
  -#    }
  -#
  -#	$r->status(200);
  -
  -#	AxKit::Debug(4, "writing xml string to browser");
  -#	my ($transformer, $doit) = get_output_transformer();
  -#	if ($AxKit::Cfg->DoGzip) {
  -#		AxKit::Debug(4, 'Sending gzipped xml string to browser');
  -#		my $data = Compress::Zlib::memGzip($doit ?
  -#					$transformer->($r->pnotes('xml_string')) :
  -#					$r->pnotes('xml_string')
  -#				);
  -#		$r->header_out('Content-Length' => length($data));
  -#		AxKit::Apache::send_http_header($r);
  -#		return DONE if $r->method eq 'HEAD';
  -#		$r->print($data);
  -#	}
  -#	else {
  -#		my $data = $doit ? $transformer->( ${$str_ref} ) : ${$str_ref};
  -#		$r->header_out('Content-Length' => length($data));
  -#		AxKit::Apache::send_http_header($r);
  - #       return DONE if $r->method eq 'HEAD';
  -#		$r->print($data);
  -#	}
  - #  	return OK;
  -#}
   
   sub prep_exception {
       my $err = shift;
  
  
  
  No                   revision
  No                   revision
  1.4.2.1   +3 -1      xml-axkit/lib/Apache/AxKit/Language.pm
  
  Index: Language.pm
  ===================================================================
  RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Language.pm,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- Language.pm	16 Jul 2003 15:18:20 -0000	1.4
  +++ Language.pm	27 Oct 2003 00:59:54 -0000	1.4.2.1
  @@ -18,6 +18,8 @@
   	return $provider->mtime();
   }
   
  +sub enable_dynamic_styles{ 0; }
  +
   sub stylesheet_exists { 1; }
   
   sub get_params {
  
  
  
  1.1.2.3   +2 -97     xml-axkit/lib/Apache/AxKit/Attic/Pipeline.pm
  
  Index: Pipeline.pm
  ===================================================================
  RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Attic/Pipeline.pm,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- Pipeline.pm	22 Oct 2003 21:48:29 -0000	1.1.2.2
  +++ Pipeline.pm	27 Oct 2003 00:59:54 -0000	1.1.2.3
  @@ -1,4 +1,3 @@
  -
   package Apache::AxKit::Pipeline;
   
   use strict;
  @@ -6,10 +5,6 @@
   use Apache::Constants;
   use Apache::Request;
   use Apache::AxKit::Provider;
  -use Apache::AxKit::Pipeline::Trace;
  -use Apache::AxKit::Pipeline::Language;
  -use Apache::AxKit::Pipeline::Head;
  -use Apache::AxKit::Pipeline::Cache;
   
   sub new{
   	my ($class) = shift;
  @@ -22,98 +17,6 @@
   	return $self;
   }
   
  -sub create_pipeline{
  -	my ($class, %args) = @_;
  -	
  -	my $r 			= delete $args{'apache'};	
  -	my $provider	= delete $args{'provider'};
  -	my $styles		= delete $args{'styles'} || [];
  -	my $lastinchain	= delete $args{'lastinchain'};
  -	
  -	# passthru interface.... only take the first N - 1 styles.
  -	# So N=1 is the provider only. N=2 is provider + first stylesheet....
  -	
  -	my @styles = @$styles;
  -			
  -	if( my $p = $r->notes()->{'axkit_passthru'} ) {
  -		my @passthru = splice( @styles, 0, $p - 1 );
  -		@styles = @passthru;
  -	}
  -		
  -	# Add a pipeline head at the top of the pipeline.
  -	# Allows for cleaner interface into provider.
  -
  -	unshift(@styles, {
  -		module => 'Apache::AxKit::Pipeline::Head',
  -		href   => undef,
  -	});
  -	
  -	if( $AxKit::Cfg->TraceIntermediate ) {
  -		
  -		# Add a trace module between each style.
  -		
  -		@styles = map { 
  -			( { 	module 	=> 'Apache::AxKit::Pipeline::Trace',
  -					href  	=> undef }, 
  -			  $_ 
  -			) }   @styles;
  -	}
  -	
  -	my $pipeline = $provider;
  -		
  -	foreach my $style ( @styles ) {
  -		$pipeline = $class->create_processor($r, $style )->upstream($pipeline);		
  -	}
  -				
  -	# always ensure pipeline is cache enabled.
  -	# so add one on the end, unless either there already is a cache somewhere in the pipeline
  -	# or the cache is disabled.
  -	
  -	if($pipeline->cache_required() && !$AxKit::Cfg->NoCache()) {
  -		$pipeline = Apache::AxKit::Pipeline::Cache->new()->upstream($pipeline);
  -	}
  -
  -	if($lastinchain) {
  -		unless( $pipeline->output_binary() ) {
  -	
  -			my ($transformer, $doit) = AxKit::get_output_transformer();
  -		
  -			if( $doit ) {
  -				$pipeline = Apache::AxKit::Pipeline::Transformer->new()->upstream($pipeline);
  -			}
  -		}
  -	}
  -	
  -	# initialise the pipeline. (very important).
  -
  -	$pipeline->set_stage();
  -	$pipeline->init($r);
  -	
  -	return $pipeline;
  -}
  -
  -sub create_processor{
  -	my ($class, $r, $style ) = @_;
  -
  -	AxKit::Debug(4, "styles: ", $style->{module}, "(", $style->{href}, ")");			
  -	no strict 'refs';
  -	my $processor = $style->{module} || $AxKit::Cfg->StyleMap->{$style->{type}};
  -
  -    AxKit::Debug(3, "Pipeline: about to create $processor");
  -    AxKit::load_module($processor);
  -	
  -	return UNIVERSAL::isa( $processor, 'Apache::AxKit::Language') ? 
  -		Apache::AxKit::Pipeline::Language->new(
  -			href		=> $style->{href},
  -			module		=> $processor,
  -			
  -		) : 
  -		$processor->new(
  -			href		=> $style->{href},
  -		);	
  -}	
  -	
  -
   sub init{
   	my $self = shift;
   	my $r = shift;
  @@ -266,6 +169,8 @@
   }	
   
   sub stylesheet_exists { 1; } 
  +
  +sub enable_dynamic_styles{ 0 };
   
   sub get_params {
       my $class = shift;
  
  
  
  No                   revision
  
  Index: Pipeline.pm
  ===================================================================
  RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Attic/Pipeline.pm,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- Pipeline.pm	22 Oct 2003 21:48:29 -0000	1.1.2.2
  +++ Pipeline.pm	27 Oct 2003 00:59:54 -0000	1.1.2.3
  @@ -1,4 +1,3 @@
  -
   package Apache::AxKit::Pipeline;
   
   use strict;
  @@ -6,10 +5,6 @@
   use Apache::Constants;
   use Apache::Request;
   use Apache::AxKit::Provider;
  -use Apache::AxKit::Pipeline::Trace;
  -use Apache::AxKit::Pipeline::Language;
  -use Apache::AxKit::Pipeline::Head;
  -use Apache::AxKit::Pipeline::Cache;
   
   sub new{
   	my ($class) = shift;
  @@ -22,98 +17,6 @@
   	return $self;
   }
   
  -sub create_pipeline{
  -	my ($class, %args) = @_;
  -	
  -	my $r 			= delete $args{'apache'};	
  -	my $provider	= delete $args{'provider'};
  -	my $styles		= delete $args{'styles'} || [];
  -	my $lastinchain	= delete $args{'lastinchain'};
  -	
  -	# passthru interface.... only take the first N - 1 styles.
  -	# So N=1 is the provider only. N=2 is provider + first stylesheet....
  -	
  -	my @styles = @$styles;
  -			
  -	if( my $p = $r->notes()->{'axkit_passthru'} ) {
  -		my @passthru = splice( @styles, 0, $p - 1 );
  -		@styles = @passthru;
  -	}
  -		
  -	# Add a pipeline head at the top of the pipeline.
  -	# Allows for cleaner interface into provider.
  -
  -	unshift(@styles, {
  -		module => 'Apache::AxKit::Pipeline::Head',
  -		href   => undef,
  -	});
  -	
  -	if( $AxKit::Cfg->TraceIntermediate ) {
  -		
  -		# Add a trace module between each style.
  -		
  -		@styles = map { 
  -			( { 	module 	=> 'Apache::AxKit::Pipeline::Trace',
  -					href  	=> undef }, 
  -			  $_ 
  -			) }   @styles;
  -	}
  -	
  -	my $pipeline = $provider;
  -		
  -	foreach my $style ( @styles ) {
  -		$pipeline = $class->create_processor($r, $style )->upstream($pipeline);		
  -	}
  -				
  -	# always ensure pipeline is cache enabled.
  -	# so add one on the end, unless either there already is a cache somewhere in the pipeline
  -	# or the cache is disabled.
  -	
  -	if($pipeline->cache_required() && !$AxKit::Cfg->NoCache()) {
  -		$pipeline = Apache::AxKit::Pipeline::Cache->new()->upstream($pipeline);
  -	}
  -
  -	if($lastinchain) {
  -		unless( $pipeline->output_binary() ) {
  -	
  -			my ($transformer, $doit) = AxKit::get_output_transformer();
  -		
  -			if( $doit ) {
  -				$pipeline = Apache::AxKit::Pipeline::Transformer->new()->upstream($pipeline);
  -			}
  -		}
  -	}
  -	
  -	# initialise the pipeline. (very important).
  -
  -	$pipeline->set_stage();
  -	$pipeline->init($r);
  -	
  -	return $pipeline;
  -}
  -
  -sub create_processor{
  -	my ($class, $r, $style ) = @_;
  -
  -	AxKit::Debug(4, "styles: ", $style->{module}, "(", $style->{href}, ")");			
  -	no strict 'refs';
  -	my $processor = $style->{module} || $AxKit::Cfg->StyleMap->{$style->{type}};
  -
  -    AxKit::Debug(3, "Pipeline: about to create $processor");
  -    AxKit::load_module($processor);
  -	
  -	return UNIVERSAL::isa( $processor, 'Apache::AxKit::Language') ? 
  -		Apache::AxKit::Pipeline::Language->new(
  -			href		=> $style->{href},
  -			module		=> $processor,
  -			
  -		) : 
  -		$processor->new(
  -			href		=> $style->{href},
  -		);	
  -}	
  -	
  -
   sub init{
   	my $self = shift;
   	my $r = shift;
  @@ -266,6 +169,8 @@
   }	
   
   sub stylesheet_exists { 1; } 
  +
  +sub enable_dynamic_styles{ 0 };
   
   sub get_params {
       my $class = shift;
  
  
  
  No                   revision
  
  Index: Pipeline.pm
  ===================================================================
  RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Attic/Pipeline.pm,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- Pipeline.pm	22 Oct 2003 21:48:29 -0000	1.1.2.2
  +++ Pipeline.pm	27 Oct 2003 00:59:54 -0000	1.1.2.3
  @@ -1,4 +1,3 @@
  -
   package Apache::AxKit::Pipeline;
   
   use strict;
  @@ -6,10 +5,6 @@
   use Apache::Constants;
   use Apache::Request;
   use Apache::AxKit::Provider;
  -use Apache::AxKit::Pipeline::Trace;
  -use Apache::AxKit::Pipeline::Language;
  -use Apache::AxKit::Pipeline::Head;
  -use Apache::AxKit::Pipeline::Cache;
   
   sub new{
   	my ($class) = shift;
  @@ -22,98 +17,6 @@
   	return $self;
   }
   
  -sub create_pipeline{
  -	my ($class, %args) = @_;
  -	
  -	my $r 			= delete $args{'apache'};	
  -	my $provider	= delete $args{'provider'};
  -	my $styles		= delete $args{'styles'} || [];
  -	my $lastinchain	= delete $args{'lastinchain'};
  -	
  -	# passthru interface.... only take the first N - 1 styles.
  -	# So N=1 is the provider only. N=2 is provider + first stylesheet....
  -	
  -	my @styles = @$styles;
  -			
  -	if( my $p = $r->notes()->{'axkit_passthru'} ) {
  -		my @passthru = splice( @styles, 0, $p - 1 );
  -		@styles = @passthru;
  -	}
  -		
  -	# Add a pipeline head at the top of the pipeline.
  -	# Allows for cleaner interface into provider.
  -
  -	unshift(@styles, {
  -		module => 'Apache::AxKit::Pipeline::Head',
  -		href   => undef,
  -	});
  -	
  -	if( $AxKit::Cfg->TraceIntermediate ) {
  -		
  -		# Add a trace module between each style.
  -		
  -		@styles = map { 
  -			( { 	module 	=> 'Apache::AxKit::Pipeline::Trace',
  -					href  	=> undef }, 
  -			  $_ 
  -			) }   @styles;
  -	}
  -	
  -	my $pipeline = $provider;
  -		
  -	foreach my $style ( @styles ) {
  -		$pipeline = $class->create_processor($r, $style )->upstream($pipeline);		
  -	}
  -				
  -	# always ensure pipeline is cache enabled.
  -	# so add one on the end, unless either there already is a cache somewhere in the pipeline
  -	# or the cache is disabled.
  -	
  -	if($pipeline->cache_required() && !$AxKit::Cfg->NoCache()) {
  -		$pipeline = Apache::AxKit::Pipeline::Cache->new()->upstream($pipeline);
  -	}
  -
  -	if($lastinchain) {
  -		unless( $pipeline->output_binary() ) {
  -	
  -			my ($transformer, $doit) = AxKit::get_output_transformer();
  -		
  -			if( $doit ) {
  -				$pipeline = Apache::AxKit::Pipeline::Transformer->new()->upstream($pipeline);
  -			}
  -		}
  -	}
  -	
  -	# initialise the pipeline. (very important).
  -
  -	$pipeline->set_stage();
  -	$pipeline->init($r);
  -	
  -	return $pipeline;
  -}
  -
  -sub create_processor{
  -	my ($class, $r, $style ) = @_;
  -
  -	AxKit::Debug(4, "styles: ", $style->{module}, "(", $style->{href}, ")");			
  -	no strict 'refs';
  -	my $processor = $style->{module} || $AxKit::Cfg->StyleMap->{$style->{type}};
  -
  -    AxKit::Debug(3, "Pipeline: about to create $processor");
  -    AxKit::load_module($processor);
  -	
  -	return UNIVERSAL::isa( $processor, 'Apache::AxKit::Language') ? 
  -		Apache::AxKit::Pipeline::Language->new(
  -			href		=> $style->{href},
  -			module		=> $processor,
  -			
  -		) : 
  -		$processor->new(
  -			href		=> $style->{href},
  -		);	
  -}	
  -	
  -
   sub init{
   	my $self = shift;
   	my $r = shift;
  @@ -266,6 +169,8 @@
   }	
   
   sub stylesheet_exists { 1; } 
  +
  +sub enable_dynamic_styles{ 0 };
   
   sub get_params {
       my $class = shift;
  
  
  
  1.1.2.1   +229 -0    xml-axkit/lib/Apache/AxKit/Attic/PipeCtrl.pm
  
  
  
  
  No                   revision
  No                   revision
  1.12.2.1  +3 -1      xml-axkit/lib/Apache/AxKit/Language/XPathScript.pm
  
  Index: XPathScript.pm
  ===================================================================
  RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Language/XPathScript.pm,v
  retrieving revision 1.12
  retrieving revision 1.12.2.1
  diff -u -r1.12 -r1.12.2.1
  --- XPathScript.pm	19 Sep 2003 10:08:04 -0000	1.12
  +++ XPathScript.pm	27 Oct 2003 00:59:55 -0000	1.12.2.1
  @@ -22,6 +22,8 @@
   
   $VERSION = '0.05';
   
  +sub enable_dynamic_styles{ 0; }
  +
   sub handler {
       my $class = shift;
       my ($r, $xml_provider, $style_provider) = @_;
  
  
  
  1.51.2.2  +2 -1      xml-axkit/lib/Apache/AxKit/Language/XSP.pm
  
  Index: XSP.pm
  ===================================================================
  RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Language/XSP.pm,v
  retrieving revision 1.51.2.1
  retrieving revision 1.51.2.2
  diff -u -r1.51.2.1 -r1.51.2.2
  --- XSP.pm	20 Oct 2003 20:58:01 -0000	1.51.2.1
  +++ XSP.pm	27 Oct 2003 00:59:55 -0000	1.51.2.2
  @@ -17,6 +17,7 @@
   @ISA = ('Apache::AxKit::Language');
   
   sub stylesheet_exists () { 0; }
  +sub enable_dynamic_styles{ 1; }
   
   sub get_mtime {
       return 30; # 30 days in the cache?
  
  
  
  No                   revision
  No                   revision
  1.1.2.3   +3 -0      xml-axkit/lib/Apache/AxKit/Pipeline/Attic/Head.pm
  
  Index: Head.pm
  ===================================================================
  RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Pipeline/Attic/Head.pm,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- Head.pm	22 Oct 2003 21:48:29 -0000	1.1.2.2
  +++ Head.pm	27 Oct 2003 00:59:55 -0000	1.1.2.3
  @@ -10,6 +10,9 @@
   
   $VERSION = 1.0; # this fixes a CPAN.pm bug. Bah!
   
  +sub init{
  +	return 
  +};
   
   sub new{
   	my $class = shift;
  
  
  
  1.1.2.2   +4 -2      xml-axkit/lib/Apache/AxKit/Pipeline/Attic/Language.pm
  
  Index: Language.pm
  ===================================================================
  RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Pipeline/Attic/Language.pm,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- Language.pm	20 Oct 2003 20:58:01 -0000	1.1.2.1
  +++ Language.pm	27 Oct 2003 00:59:55 -0000	1.1.2.2
  @@ -21,14 +21,16 @@
   	return $self;
   }
   
  +sub enable_dyanmic_styles{
  +	return shift->{'module'}->enable_dynamic_styles();
  +}
   
   sub has_changed{ 
   	return shift->upstream()->has_changed( shift );
   }
   	
   sub stylesheet_exists{
  -	my $self = shift;
  -	return $self->{'module'}->stylesheet_exists();
  +	return shift->{'module'}->stylesheet_exists();
   }
   
   sub get_dom {
  
  
  
  1.1.2.2   +1 -1      xml-axkit/lib/Apache/AxKit/Pipeline/Attic/XSP.pm
  
  Index: XSP.pm
  ===================================================================
  RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Pipeline/Attic/XSP.pm,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- XSP.pm	20 Oct 2003 20:58:01 -0000	1.1.2.1
  +++ XSP.pm	27 Oct 2003 00:59:55 -0000	1.1.2.2
  @@ -254,7 +254,7 @@
   
   sub stylesheet_exists{  0; }
   
  -
  +sub enable_dynamic_styles{ 1 };
   
   1;
   
  
  
  
  No                   revision
  
  Index: XSP.pm
  ===================================================================
  RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Pipeline/Attic/XSP.pm,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- XSP.pm	20 Oct 2003 20:58:01 -0000	1.1.2.1
  +++ XSP.pm	27 Oct 2003 00:59:55 -0000	1.1.2.2
  @@ -254,7 +254,7 @@
   
   sub stylesheet_exists{  0; }
   
  -
  +sub enable_dynamic_styles{ 1 };
   
   1;
   
  
  
  
  No                   revision
  
  Index: XSP.pm
  ===================================================================
  RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Pipeline/Attic/XSP.pm,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- XSP.pm	20 Oct 2003 20:58:01 -0000	1.1.2.1
  +++ XSP.pm	27 Oct 2003 00:59:55 -0000	1.1.2.2
  @@ -254,7 +254,7 @@
   
   sub stylesheet_exists{  0; }
   
  -
  +sub enable_dynamic_styles{ 1 };
   
   1;
   
  
  
  
  1.1.2.1   +39 -0     xml-axkit/lib/Apache/AxKit/Pipeline/Attic/DoStyles.pm
  
  
  
  
  1.1.2.1   +39 -0     xml-axkit/lib/Apache/AxKit/Pipeline/Attic/Tail.pm
  
  
  
  
  No                   revision
  No                   revision
  1.1.8.1   +4 -3      xml-axkit/lib/Apache/AxKit/Provider/Scalar.pm
  
  Index: Scalar.pm
  ===================================================================
  RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Provider/Scalar.pm,v
  retrieving revision 1.1
  retrieving revision 1.1.8.1
  diff -u -r1.1 -r1.1.8.1
  --- Scalar.pm	13 Jan 2002 20:45:12 -0000	1.1
  +++ Scalar.pm	27 Oct 2003 00:59:55 -0000	1.1.8.1
  @@ -28,8 +28,8 @@
   
   sub init {
       my $self = shift;
  -    $self->{data} = $_[0];
  -    $self->{styles} = $_[1];
  +    $self->{data} = shift;
  +    $self->{styles} = shift;
       
   #    warn "Scalar Provider constructed with: $self->{data}\n";
   }
  @@ -55,6 +55,7 @@
   
   sub get_strref {
       my $self = shift;
  +    
       return \$self->{data};
   }
   
  
  
  
  No                   revision
  
  Index: Scalar.pm
  ===================================================================
  RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Provider/Scalar.pm,v
  retrieving revision 1.1
  retrieving revision 1.1.8.1
  diff -u -r1.1 -r1.1.8.1
  --- Scalar.pm	13 Jan 2002 20:45:12 -0000	1.1
  +++ Scalar.pm	27 Oct 2003 00:59:55 -0000	1.1.8.1
  @@ -28,8 +28,8 @@
   
   sub init {
       my $self = shift;
  -    $self->{data} = $_[0];
  -    $self->{styles} = $_[1];
  +    $self->{data} = shift;
  +    $self->{styles} = shift;
       
   #    warn "Scalar Provider constructed with: $self->{data}\n";
   }
  @@ -55,6 +55,7 @@
   
   sub get_strref {
       my $self = shift;
  +    
       return \$self->{data};
   }
   
  
  
  
  No                   revision
  
  Index: Scalar.pm
  ===================================================================
  RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Provider/Scalar.pm,v
  retrieving revision 1.1
  retrieving revision 1.1.8.1
  diff -u -r1.1 -r1.1.8.1
  --- Scalar.pm	13 Jan 2002 20:45:12 -0000	1.1
  +++ Scalar.pm	27 Oct 2003 00:59:55 -0000	1.1.8.1
  @@ -28,8 +28,8 @@
   
   sub init {
       my $self = shift;
  -    $self->{data} = $_[0];
  -    $self->{styles} = $_[1];
  +    $self->{data} = shift;
  +    $self->{styles} = shift;
       
   #    warn "Scalar Provider constructed with: $self->{data}\n";
   }
  @@ -55,6 +55,7 @@
   
   sub get_strref {
       my $self = shift;
  +    
       return \$self->{data};
   }
   
  
  
  
  1.1.2.1   +77 -0     xml-axkit/lib/Apache/AxKit/Provider/Attic/DOM.pm
  
  
  
  
  No                   revision
  No                   revision
  1.7.2.3   +6 -0      xml-axkit/t/conf/extra.last.conf.in
  
  Index: extra.last.conf.in
  ===================================================================
  RCS file: /home/cvs/xml-axkit/t/conf/extra.last.conf.in,v
  retrieving revision 1.7.2.2
  retrieving revision 1.7.2.3
  diff -u -r1.7.2.2 -r1.7.2.3
  --- extra.last.conf.in	22 Oct 2003 21:48:29 -0000	1.7.2.2
  +++ extra.last.conf.in	27 Oct 2003 00:59:55 -0000	1.7.2.3
  @@ -169,3 +169,9 @@
           AxAddProcessor text/xsl /style/pipeline/sax/03.xsl
   </Location>
   
  +<Location "/pipeline/styles/01.xsp">
  +	SetHandler axkit
  +	AxAddStyleMap application/xsp Apache::AxKit::Pipeline::XSP
  +	AxAddProcessor application/xsp NULL
  +	AxResetProcessors
  +</Location>
  
  
  
  No                   revision
  No                   revision
  1.1.2.1   +11 -0     xml-axkit/t/htdocs/pipeline/styles/Attic/01.xsp
  
  
  
  
  No                   revision
  No                   revision
  1.1.2.1   +9 -0      xml-axkit/t/htdocs/style/pipeline/styles/Attic/01.xsl
  
  
  
  
  No                   revision
  No                   revision
  1.1.2.1   +16 -0     xml-axkit/t/pipeline/Attic/03styles.t