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/lib/Apache/AxKit Provider.pm
Date Thu, 20 May 2004 18:43:04 GMT
mach        2004/05/20 11:43:04

  Modified:    lib/Apache/AxKit Tag: axkit-pipeline-2 Provider.pm
  Log:
  removing get styles
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.18.2.2  +1 -73     xml-axkit/lib/Apache/AxKit/Provider.pm
  
  Index: Provider.pm
  ===================================================================
  RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Provider.pm,v
  retrieving revision 1.18.2.1
  retrieving revision 1.18.2.2
  diff -u -r1.18.2.1 -r1.18.2.2
  --- Provider.pm	10 Dec 2003 22:45:19 -0000	1.18.2.1
  +++ Provider.pm	20 May 2004 18:43:04 -0000	1.18.2.2
  @@ -234,78 +234,6 @@
       };
   }
   
  -sub get_styles {
  -    my $self = shift;
  -    my ($media, $pref_style) = @_;
  -
  -    if ($pref_style eq '#default') {
  -        undef $pref_style;
  -    }
  -
  -	my @styles;
  -    my $key = $self->key();
  -
  -    # need to extract the following from the XML file:
  -    #   DocType Public Identifier
  -    #   DTD filename
  -    #   Root element name (including namespace)
  -    # use three element array @$vals
  -	if( $AxKit::Cfg->IfAxAddFooProcessors($media, $pref_style) || ! $AxKit::Cfg->IgnoreStylePI())
{
  -	
  -		my ($doctype, $dtd, $root, $xml_styles) = $self->get_xml_info( $media, $pref_style
);
  -	
  -    	foreach my $style (@$xml_styles) {
  -    	    $style->{title} ||= '#default';
  -    	}
  -    
  -    	# Let GetMatchingProcessors to process the @$styles array
  -    	{
  -    	  local $^W; # suppress "Use of uninitialized value" warnings
  -    	  AxKit::Debug(4, "Calling GetMatchingProcessors with ($media, $pref_style, $doctype,
$dtd, $root)");
  -    	}
  -    	@styles = $AxKit::Cfg->GetMatchingProcessors($media, $pref_style, $doctype, $dtd,
$root, $xml_styles, $self);
  -    } else{
  -    	{
  -    	  local $^W; # suppress "Use of uninitialized value" warnings
  -    	  AxKit::Debug(4, "No AxAdd*Processors detected, bypassing get_styles()");
  -    	  AxKit::Debug(4, "Calling GetMatchingProcessors with ($media, $pref_style).");
  -    	}
  -
  -    	@styles = $AxKit::Cfg->GetMatchingProcessors($media, $pref_style, undef, undef,
undef, [], $self);
  -    
  -    }
  -    if (!@styles) {
  -        throw Apache::AxKit::Exception::Declined( reason => "No styles defined for '$key'"
);
  -    }
  -    
  -    # get mime-type => module mapping
  -    my $style_mapping = $AxKit::Cfg->StyleMap;
  -
  -    AxKit::Debug(3, "get_styles: loading style modules");    
  -    for my $style (@styles) {
  -        my $mapto;
  -        AxKit::Debug(4, "get_styles: looking for mapping for style type: '$style->{type}'");
  -        if (!( $mapto = $style_mapping->{ $style->{type} } )) {
  -            throw Apache::AxKit::Exception::Declined(
  -                    reason => "No implementation mapping available for type '$style->{type}'"
  -                    );
  -        }
  -
  -        $style->{module} = $mapto;
  -
  -        # first load module if it's not already loaded.
  -        eval {
  -            AxKit::load_module($mapto);
  -        };
  -        if ($@) {
  -            throw Apache::AxKit::Exception::Error(
  -                    -text => "Load of '$mapto' failed with: $@"
  -                    );
  -        }
  -    }
  -    
  -    return \@styles;
  -}
   
   sub get_xml_info{
   	my ($self, $media, $pref_style ) = @_;
  
  
  

Mime
View raw message