Changeset 9998
- Timestamp:
- 2005-06-01T15:47:06+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/ISISPlug.pm
r8762 r9998 90 90 # This plugin splits the input text at the "----------" lines 91 91 sub get_default_split_exp { 92 return q^\ n----------\n^;92 return q^\r?\n----------\r?\n^; 93 93 } 94 94 … … 149 149 150 150 # Map the tag numbers to tag names, using the FDT mapping 151 $$textref =~ s/\ ntag=(\d+) /\ntag=$fdtmapping{$1}{'title'} /g;151 $$textref =~ s/\r?\ntag=(\d+) /\ntag=$fdtmapping{$1}{'title'} /g; 152 152 153 153 # Remove the line at the start so it is split and processed properly … … 206 206 my $metadatafieldname = $tagname . $subfieldname; 207 207 my $metadatafieldvalue = $1; 208 209 # Escape any '<' and '>' characters so they appear correctly in the final collection210 $metadatafieldvalue =~ s/\</</g;211 $metadatafieldvalue =~ s/\>/>/g;212 208 213 209 # Handle Keywords specially … … 215 211 my $keywordmetadatavalue = $metadatafieldvalue; 216 212 my $keywordlist = ""; 217 while ($keywordmetadatavalue =~ s/\<( [^\>]+)\>//) {213 while ($keywordmetadatavalue =~ s/\<(.+?)\>//) { 218 214 my $keyword = $1; 219 215 $doc_obj->add_utf8_metadata($cursection, $metadatafieldname, $keyword); … … 225 221 } 226 222 227 else { 223 # Escape any '<' and '>' characters so they appear correctly in the final collection 224 $metadatafieldvalue =~ s/\</</g; 225 $metadatafieldvalue =~ s/\>/>/g; 226 227 # We have already added Keywords metadata above 228 unless ($metadatafieldname eq "Keywords") { 228 229 $doc_obj->add_utf8_metadata($cursection, $metadatafieldname, $metadatafieldvalue); 229 230 }
Note:
See TracChangeset
for help on using the changeset viewer.