Changeset 28267 for main/trunk
- Timestamp:
- 2013-09-12T13:03:28+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/GreenstoneXMLPlugin.pm
r28265 r28267 105 105 # can we process this file?? 106 106 my ($filename_full_path, $filename_no_path) = &util::get_full_filenames($base_dir, $file); 107 107 108 return undef unless $self->can_process_this_file($filename_full_path); 108 109 … … 145 146 146 147 sub xml_start_document { 147 } 148 149 sub xml_end_document { 150 } 151 152 sub get_doctype { 153 my $self = shift(@_); 154 155 return "(Greenstone)?Archive"; 156 } 157 158 159 sub xml_doctype { 148 160 149 my $self = shift(@_); 161 150 162 151 my ($expat, $name, $sysid, $pubid, $internal) = @_; 163 164 # allow the short-lived and badly named "GreenstoneArchive" files to be processed165 # as well as the "Archive" files which should now be created by import.pl166 die "" if ($name !~ /^(Greenstone)?Archive$/);167 152 168 153 my $outhandle = $self->{'outhandle'}; 169 154 print $outhandle "GreenstoneXMLPlugin: processing $self->{'file'}\n" if $self->{'verbosity'} > 1; 170 155 print STDERR "<Processing n='$self->{'file'}' p='GreenstoneXMLPlugin'>\n" if $self->{'gli'}; 156 157 } 158 159 sub xml_end_document { 160 } 161 162 sub get_doctype { 163 my $self = shift(@_); 164 165 return "(Greenstone)?Archive"; 166 } 167 168 169 sub xml_doctype { 170 my $self = shift(@_); 171 172 my ($expat, $name, $sysid, $pubid, $internal) = @_; 173 174 # Some doc.xml files that have been manipulated by XML::Rules 175 # no longer have the DOCTYPE line. No obvious way to fix 176 # the XML::Rules based code to keep DOCTYPE, so commenting 177 # out the code below to allow doc.xml files with DOCTYPE 178 # to be processed 179 180 # allow the short-lived and badly named "GreenstoneArchive" files to be processed 181 # as well as the "Archive" files which should now be created by import.pl 182 ## die "" if ($name !~ /^(Greenstone)?Archive$/); 183 184 # my $outhandle = $self->{'outhandle'}; 185 # print $outhandle "GreenstoneXMLPlugin: processing $self->{'file'}\n" if $self->{'verbosity'} > 1; 186 # print STDERR "<Processing n='$self->{'file'}' p='GreenstoneXMLPlugin'>\n" if $self->{'gli'}; 171 187 172 188 }
Note:
See TracChangeset
for help on using the changeset viewer.