Changeset 3207 for trunk/protemix/perllib
- Timestamp:
- 2002-07-03T12:57:49+12:00 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/protemix/perllib/plugins/ProtemixPlug.pm
r3194 r3207 32 32 sub BEGIN { 33 33 @ISA = ('HTMLPlug'); 34 unshift (@INC, "$ENV{'GSDLHOME'}/perllib/cpan"); 34 35 } 35 36 … … 68 69 69 70 # 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 ); 71 74 $self->{'section_metadata'} = {}; 72 75 $self->{'Page'} = "TopLevel"; … … 131 134 132 135 # 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 } 140 141 141 142 $count ++; … … 199 200 } 200 201 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. 205 sub Char { 206 $_[0]->{'Text'} .= $_[1]; 207 return undef; 208 } 209 201 210 202 211 1;
Note:
See TracChangeset
for help on using the changeset viewer.