Changeset 12309
- Timestamp:
- 2006-07-26T15:28:37+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/ProCitePlug.pm
r12169 r12309 57 57 'abstract' => "no", 58 58 'inherits' => "yes", 59 'explodes' => "yes", 59 60 'args' => $arguments }; 60 61 … … 116 117 my $self = shift (@_); 117 118 my ($filename, $encoding, $language, $textref) = @_; 118 119 119 120 # Store the workform definitions for this file 120 121 my %workform_definitions = (); … … 133 134 $$textref =~ s/^\<Workform Definition\>(.*)\n//; 134 135 my $workform_definition = $1; 135 136 136 # Parse the workform definitions and store them for later 137 137 $workform_definition =~ s/^\"([^\"]*)\",//; 138 138 my $workform_name = $1; 139 140 139 my @workform_values; 141 while ($workform_definition !~ /^ $/) {140 while ($workform_definition !~ /^\s*$/) { 142 141 $workform_definition =~ s/^\"([^\"]*)\",?//; 143 142 my $workform_field = $1; … … 167 166 168 167 # Build up an HTML view of the record for easy display at run-time 169 my $html_record = " ";168 my $html_record = "<table>"; 170 169 171 170 # Read the record's workform indicator and record number … … 182 181 my %workform_definitions = %{$self->{'workform_definitions'}->{$filename}}; 183 182 if (!$workform_definitions{$workform_indicator}) { 184 print STDERR "Unknown workform !\n";183 print STDERR "Unknown workform $workform_indicator!\n"; 185 184 return 0; 186 185 } … … 202 201 # Read each field (surrounded by quotes) of the record 203 202 my $fieldnum = 0; 204 while ($$textref !~ /^ $/) {203 while ($$textref !~ /^\s*$/) { 205 204 $$textref =~ s/^\"([^\"]*)\",?//; 206 205 my $field_value_raw = $1; … … 231 230 } 232 231 232 $html_record .= "</table>"; 233 233 # Store HTML view of record as metadata 234 234 $doc_obj->add_utf8_metadata($cursection, "HTMLDisplay", $html_record);
Note:
See TracChangeset
for help on using the changeset viewer.