xml-axkit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject cvs commit: xml-axkit/t/pipeline 03styles.t
Date Mon, 27 Oct 2003 22:42:16 GMT
mach        2003/10/27 14:42:16

  Modified:    .        Tag: axkit-pipeline-2 MANIFEST
               lib/Apache/AxKit Tag: axkit-pipeline-2 PipeCtrl.pm
                        Pipeline.pm
               t/conf   Tag: axkit-pipeline-2 extra.last.conf.in
               t/pipeline Tag: axkit-pipeline-2 03styles.t
  Added:       t/htdocs/pipeline/styles Tag: axkit-pipeline-2 02.xsp
  Log:
  adding a pre styles test, + tweaking the way pipelines get glued together to allow
  a pipeline to be treated as a single stage.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.20.2.5  +1 -0      xml-axkit/MANIFEST
  
  Index: MANIFEST
  ===================================================================
  RCS file: /home/cvs/xml-axkit/MANIFEST,v
  retrieving revision 1.20.2.4
  retrieving revision 1.20.2.5
  diff -u -r1.20.2.4 -r1.20.2.5
  --- MANIFEST	27 Oct 2003 00:59:54 -0000	1.20.2.4
  +++ MANIFEST	27 Oct 2003 22:42:15 -0000	1.20.2.5
  @@ -232,6 +232,7 @@
   t/htdocs/style/pipeline/sax/03.xsl
   t/AxKitSaxTest.pm
   t/htdocs/pipeline/styles/01.xsp
  +t/htdocs/pipeline/styles/02.xsp
   t/htdocs/style/pipeline/styles/01.xsl
   t/pipeline/03styles.t
   typemap
  
  
  
  No                   revision
  No                   revision
  1.1.2.2   +9 -2      xml-axkit/lib/Apache/AxKit/Attic/PipeCtrl.pm
  
  Index: PipeCtrl.pm
  ===================================================================
  RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Attic/PipeCtrl.pm,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- PipeCtrl.pm	27 Oct 2003 00:59:54 -0000	1.1.2.1
  +++ PipeCtrl.pm	27 Oct 2003 22:42:16 -0000	1.1.2.2
  @@ -108,6 +108,9 @@
   		
   	foreach my $style ( @styles ) {
   		$pipeline = $self->create_processor($r, $style )->upstream($pipeline);		
  +		if($pipeline->enable_dynamic_styles()) {
  +			$pipeline = Apache::AxKit::Pipeline::DoStyles->new()->upstream( $pipeline );
  +		} 
   	}
   				
   	# always ensure pipeline is cache enabled.
  @@ -133,7 +136,7 @@
   
   	$pipeline->set_stage();
   	$pipeline->init($r);
  -	
  +		
   	return $pipeline;
   }
   
  @@ -159,7 +162,11 @@
   	my $pipeline = $provider;
   		
   	foreach my $style ( @styles ) {
  -		$pipeline = $self->create_processor($r, $style )->upstream($pipeline);		
  +		$pipeline = $self->create_processor($r, $style )->upstream($pipeline);	
  +		if($pipeline->enable_dynamic_styles()) {
  +			$pipeline = Apache::AxKit::Pipeline::DoStyles->new()->upstream( $pipeline );
  +		}
  +			
   	}
   	
   	$pipeline->set_stage();
  
  
  
  1.1.2.4   +9 -1      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.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- Pipeline.pm	27 Oct 2003 00:59:54 -0000	1.1.2.3
  +++ Pipeline.pm	27 Oct 2003 22:42:16 -0000	1.1.2.4
  @@ -58,7 +58,15 @@
   
   sub upstream{ 	
   	my $self = shift; 
  -	if(@_) { $self->{'upstream'} = shift; return $self;} 
  +	if(@_) { 
  +		if($self->{'upstream'}) {
  +			# Allow pipelines to be treated as one object
  +			$self->{'upstream'}->upstream( shift )
  +		} else {
  +			$self->{'upstream'} = shift; 
  +		}
  +		return $self;
  +	} 
   	return $self->{'upstream'} 
   }
   
  
  
  
  No                   revision
  No                   revision
  1.7.2.4   +7 -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.3
  retrieving revision 1.7.2.4
  diff -u -r1.7.2.3 -r1.7.2.4
  --- extra.last.conf.in	27 Oct 2003 00:59:55 -0000	1.7.2.3
  +++ extra.last.conf.in	27 Oct 2003 22:42:16 -0000	1.7.2.4
  @@ -175,3 +175,10 @@
   	AxAddProcessor application/xsp NULL
   	AxResetProcessors
   </Location>
  +
  +<Location "/pipeline/styles/02.xsp">
  +        SetHandler axkit
  +        AxAddStyleMap application/xsp Apache::AxKit::Pipeline::XSP
  +        AxAddProcessor application/xsp NULL
  +        AxResetProcessors
  +</Location>
  
  
  
  No                   revision
  No                   revision
  1.1.2.1   +12 -0     xml-axkit/t/htdocs/pipeline/styles/Attic/02.xsp
  
  
  
  
  No                   revision
  No                   revision
  1.1.2.2   +9 -2      xml-axkit/t/pipeline/Attic/03styles.t
  
  Index: 03styles.t
  ===================================================================
  RCS file: /home/cvs/xml-axkit/t/pipeline/Attic/03styles.t,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- 03styles.t	27 Oct 2003 00:59:55 -0000	1.1.2.1
  +++ 03styles.t	27 Oct 2003 22:42:16 -0000	1.1.2.2
  @@ -3,7 +3,7 @@
   use Apache::TestUtil;
   use Apache::TestRequest qw( GET POST ) ;
   
  -plan tests => 1, have_module qw(LWP);
  +plan tests => 2, have_module qw(LWP);
   
   
   sub test_basic {
  @@ -12,5 +12,12 @@
       return 1;
   }
   
  -ok( test_basic(),1,    "Testing dynamic styles" );
   
  +sub test_basic2 {
  +    my $resp = GET '/pipeline/styles/02.xsp' ;
  +    return 0 unless $resp->content =~ /style applied/gi;
  +    return 1;
  +}
  +
  +ok( test_basic(),1,    "Testing dynamic styles" );
  +ok( test_basic2(), 1,  "Testing dynamic pre styles");
  
  
  

Mime
View raw message