Ignore:
Timestamp:
2005-07-06T15:27:45+12:00 (19 years ago)
Author:
kjdon
Message:

Jeffrey's new parsing modifications, committed approx 6 July, 15.16

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/XMLPlug.pm

    r10170 r10218  
    2828use BasPlug;
    2929use doc;
     30#$%^
     31use parse2;
    3032
    3133sub BEGIN {
     
    5759our ($self);
    5860sub new {
    59     my $class = shift (@_);
    60 
     61    my ($class) = shift (@_);
     62    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
     63    push(@$pluginlist, $class);
     64
     65    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
     66    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
     67   
    6168    # $self is global for use within subroutines called by XML::Parser
    62     $self = new BasPlug ($class, @_);
    63     $self->{'plugin_type'} = "XMLPlug";
    64     # 14-05-02 To allow for proper inheritance of arguments - John Thompson
    65     my $option_list = $self->{'option_list'};
    66     push( @{$option_list}, $options );
    67    
    68     if (!parsargv::parse(\@_,
    69              q^xslt/.*/^, \$self->{'xslt'},
    70              "allow_extra_options")) {
    71 
    72     print STDERR "\nIncorrect options passed to XSLTPlug, check your collect.cfg configuration file\n";
    73     $self->print_txt_usage("");  # Use default resource bundle
    74     die "\n";
    75     }
    76 
     69    $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
    7770
    7871    my $parser = new XML::Parser('Style' => 'Stream',
     
    8275                        'Doctype' => \&Doctype,
    8376                        'Default' => \&Default
    84                         });
    85 
    86    
    87                
     77                        }); 
    8878    $self->{'parser'} = $parser;
    8979
Note: See TracChangeset for help on using the changeset viewer.