Ignore:
Timestamp:
2006-10-27T13:41:01+13:00 (18 years ago)
Author:
kjdon
Message:

Moved all printing stuff out of doc.pm.
docprint now prints a GA representation of a doc obj - use &docprint::get_section_xml instead of $doc_obj->buffer_section_xml or $doc_obj->output_section.
Most of the code has been moved into plugouts, except for the bit thats gone to docprint.pm.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugouts/METSPlugout.pm

    r13051 r13172  
    3232use util;
    3333use BasPlugout;
     34use docprint; # for escape_text
    3435
    3536sub BEGIN {
     
    218219   
    219220    my $all_text = "<Section>\n";
    220     $all_text .= $doc_obj->_escape_text("$section_ptr->{'text'}");
     221    $all_text .= &docprint::escape_text("$section_ptr->{'text'}");
    221222   
    222223    #output all the subsections
     
    326327    $all_text .= "  <oai_dc:dc $dc_namespace>\n";
    327328
    328     $all_text .= $doc_obj->buffer_dc_section($section,"oai_dc");
     329    $all_text .= $self->get_dc_metadata($doc_obj, $section,"oai_dc");
    329330    $all_text .= "  </oai_dc:dc>\n";
    330331    }
    331332    else {
    332333    foreach my $data (@{$section_ptr->{'metadata'}}){
    333         my $escaped_value = $doc_obj->_escape_text($data->[1]);
     334        my $escaped_value = &docprint::escape_text($data->[1]);
    334335        $all_text .= '      <gsdl3:Metadata name="'. $data->[0].'">'. $escaped_value. "</gsdl3:Metadata>\n";
    335336        if ($data->[0] eq "dc.Title") {
     
    420421
    421422    foreach my $data (@{$section_ptr->{'metadata'}}){
    422        my $escaped_value = $doc_obj->_escape_text($data->[1]);
     423       my $escaped_value = &docprint::escape_text($data->[1]);
    423424   
    424425       if ($data->[0] eq "gsdlsourcefilename") {
     
    513514
    514515    foreach my $data (@{$section_ptr->{'metadata'}}){
    515        my $escaped_value = $doc_obj->_escape_text($data->[1]);
     516       my $escaped_value = &docprint::escape_text($data->[1]);
    516517
    517518       if (($data->[0] eq "gsdlsourcefilename") && ($version ne "fedora")) {
Note: See TracChangeset for help on using the changeset viewer.