Ignore:
Timestamp:
2002-07-03T12:57:49+12:00 (22 years ago)
Author:
sjboddie
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/protemix/perllib/plugins/ProtemixPlug.pm

    r3194 r3207  
    3232sub BEGIN {
    3333    @ISA = ('HTMLPlug');
     34    unshift (@INC, "$ENV{'GSDLHOME'}/perllib/cpan");
    3435}
    3536
     
    6869
    6970    # process the meta.xml file and set top level metadata
    70     my $parser = new XML::Parser('Style' => 'Stream');
     71    my $parser = new XML::Parser('Style' => 'Stream',
     72                 'Handlers' => {'Char' => \&Char}
     73                 );
    7174    $self->{'section_metadata'} = {};
    7275    $self->{'Page'} = "TopLevel";
     
    131134
    132135        # add any section level metadata we have for this page (set from within the meta.xml file)
    133 
    134 # currently commented out as we're not using Class1, Class2, and Class3 metadata yet
    135 #       if (defined ($self->{'section_metadata'}->{$filesuf})) {
    136 #       foreach my $key (keys %{$self->{'section_metadata'}->{$filesuf}}) {
    137 #           $doc_obj->add_utf8_metadata ($cursection, $key, $self->{'section_metadata'}->{$filesuf}->{$key});
    138 #       }
    139 #       }
     136        if (defined ($self->{'section_metadata'}->{$filesuf})) {
     137        foreach my $key (keys %{$self->{'section_metadata'}->{$filesuf}}) {
     138            $doc_obj->add_utf8_metadata ($cursection, $key, $self->{'section_metadata'}->{$filesuf}->{$key});
     139        }
     140        }
    140141
    141142        $count ++;
     
    199200}
    200201
     202# This Char function overrides the one in XML::Parser::Stream to overcome a
     203# problem where $expat->{Text} is treated as the return value, slowing
     204# things down significantly in some cases.
     205sub Char {
     206  $_[0]->{'Text'} .= $_[1];
     207  return undef;
     208}
     209
    201210
    2022111;
Note: See TracChangeset for help on using the changeset viewer.