Changeset 8894 for trunk/gsdl/perllib/doc.pm
- Timestamp:
- 2005-01-12T16:10:16+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/doc.pm
r8797 r8894 8 8 # Copyright (C) 1999 New Zealand Digital Library Project 9 9 # 10 # This program is free software; you can redistr ibute it and/or modify10 # This program is free software; you can redistr te it and/or modify 11 11 # it under the terms of the GNU General Public License as published by 12 12 # the Free Software Foundation; either version 2 of the License, or … … 273 273 sub buffer_mets_fileSection_section_xml() { 274 274 my $self = shift(@_); 275 my ($section , $doc_Dir) = @_;276 277 $section="" unless defined $section;275 my ($section) = @_; 276 277 #$section="" unless defined $section; 278 278 279 279 … … 301 301 $all_text .= $xpath; 302 302 303 $all_text .= ']/text())" ID="FILE'. $section_num. '"/>' . "\n";303 $all_text .= ']/text())" />' . "\n"; 304 304 $all_text .= " </mets:file>\n"; 305 305 $all_text .= " </mets:fileGrp>\n"; … … 307 307 308 308 foreach my $subsection (@{$section_ptr->{'subsection_order'}}){ 309 $all_text .= $self->buffer_mets_fileSection_section_xml("$section.$subsection",$doc_Dir);309 $all_text .= $self->buffer_mets_fileSection_section_xml("$section.$subsection"); 310 310 } 311 311 … … 339 339 $all_text .= ' <mets:file MIMETYPE="text/xml" ID="default.'.$fileID.'">'. "\n"; 340 340 341 $all_text .= ' <mets:FLocat LOCTYPE="URL" xlink:href="file:'.$data->[1].'" ID="default.'.$fileID.'"/>'."\n";341 $all_text .= ' <mets:FLocat LOCTYPE="URL" xlink:href="file:'.$data->[1].'" />'."\n"; 342 342 343 343 $all_text .= " </mets:file>\n"; … … 351 351 352 352 $all_text .= ' <mets:file MIMETYPE="'.$2.'" ID="default.'.$fileID. '">'. "\n"; 353 $all_text .= ' <mets:FLocat LOCTYPE="URL" xlink:href="file:'.$assfilePath.'" ID="default.'. $fileID.'"/>'."\n";353 $all_text .= ' <mets:FLocat LOCTYPE="URL" xlink:href="file:'.$assfilePath.'" />'."\n"; 354 354 355 355 $all_text .= " </mets:file>\n"; … … 379 379 my $dmd_num = $section_num; 380 380 381 # **output the dmdSection details382 if ($section_num eq "1") {383 $dmd_num = "0";384 }381 ##**output the dmdSection details 382 #if ($section_num eq "1") { 383 # $dmd_num = "0"; 384 #} 385 385 386 386 #**output the StruMap details … … 414 414 my $all_text="" unless defined $all_txt; 415 415 my $fileID=0; 416 my $order_num = 0; 416 417 417 418 $all_text .= '<mets:structMap ID="All" TYPE="Whole Document" LABEL="All">'."\n"; 418 $all_text .= ' <mets:div ID=" All" TYPE="Document" ORDER="All" ORDERLABEL="All" LABEL="Whole Documemt" DMDID="DM1">' . "\n";419 $all_text .= ' <mets:div ID="DSAll" TYPE="Document" ORDER="'.$order_num.'" ORDERLABEL="All" LABEL="Whole Documemt" DMDID="DM1">' . "\n"; 419 420 420 421 … … 456 457 my $dmd_num = $section_num; 457 458 458 # **output the dmdSection details459 if ($section_num eq "1") {460 $dmd_num = "0";461 }459 # #**output the dmdSection details 460 # if ($section_num eq "1") { 461 # $dmd_num = "0"; 462 # } 462 463 my $all_text = '<mets:dmdSec ID="DM'.$dmd_num.'" GROUPID="'.$section_num.'">'. "\n"; 463 $all_text .= ' <mets:mdWrap MDT ype="gsdl3" ID="'.$section_num.'">'."\n";464 $all_text .= ' <mets:mdWrap MDTYPE="OTHER" OTHERMDTYPE="gsdl3" ID="gsdl'.$section_num.'">'."\n"; 464 465 $all_text .= " <mets:xmlData>\n"; 465 466 foreach my $data (@{$section_ptr->{'metadata'}}){ … … 530 531 sub output_mets_section { 531 532 my $self = shift(@_); 532 my ($handle, $section , $doc_Dir) = @_;533 533 my ($handle, $section) = @_; 534 534 535 #***print out the dmdSection 535 536 print $handle $self->buffer_mets_dmdSection_section_xml($section); … … 537 538 #***print out the fileSection by sections 538 539 print $handle "<mets:fileSec>\n"; 539 print $handle $self->buffer_mets_fileSection_section_xml($section ,$doc_Dir);540 print $handle $self->buffer_mets_fileSection_section_xml($section); 540 541 541 542 #***print out the whole fileSection … … 1192 1193 } 1193 1194 1195 #print STDERR "###$field=$value\n"; 1194 1196 # double check that the value is utf-8 1195 1197 if (unicode::ensure_utf8(\$value)) {
Note:
See TracChangeset
for help on using the changeset viewer.