Changeset 16504

Show
Ignore:
Timestamp:
22.07.2008 12:08:59 (12 years ago)
Author:
mdewsnip
Message:

Changed some variable names in preparation for fixing the Lucene section indexing.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/lucenebuildproc.pm

    r16431 r16504  
    8181    my ($fields) = split (/:/, $self->{'index'}); 
    8282 
    83     my $doc_level = $mgppbuildproc::level_map{'document'}; 
     83    my $doc_tag_name = $mgppbuildproc::level_map{'document'}; 
    8484 
    8585    my $levels = $self->{'levels'}; 
     
    102102    } 
    103103    my $gs2_docOID = $doc_obj->get_OID(); 
    104     my $documenttag = "<$doc_level xmlns:gs2=\"http://www.greenstone.org/gs2\" file=\"$file\" gs2:id=\"$gs2_id\" gs2:docOID=\"$gs2_docOID\">\n"; 
    105     my $documentendtag = "\n</$doc_level>\n"; 
    106  
    107     my ($sectiontag) = ""; 
     104    my $documenttag = "<$doc_tag_name xmlns:gs2=\"http://www.greenstone.org/gs2\" file=\"$file\" gs2:id=\"$gs2_id\" gs2:docOID=\"$gs2_docOID\">\n"; 
     105    my $documentendtag = "\n</$doc_tag_name>\n"; 
     106 
     107    my $sec_tag_name = ""; 
    108108    if ($lsec_level) 
    109109      { 
    110     $sectiontag = $mgppbuildproc::level_map{'section'}; 
     110    $sec_tag_name = $mgppbuildproc::level_map{'section'}; 
    111111      } 
    112112    my ($parastarttag) = ""; 
     
    137137    $self->{'num_sections'}++; 
    138138 
    139     if ($sectiontag ne "") 
     139    if ($sec_tag_name ne "") 
    140140          { 
    141141        my $secid = "gs2:id=\"".$self->{'num_sections'}."\""; 
    142         $text .= "\n<$sectiontag $secid >\n"; 
     142        $text .= "\n<$sec_tag_name $secid >\n"; 
    143143          } 
    144144 
     
    148148    my $indexed_section = $doc_obj->get_metadata_element($section, "gsdldoctype") || "indexed_section"; 
    149149    if (($indexed_doc == 0) || ($indexed_section ne "indexed_section" && $indexed_section ne "indexed_doc")) { 
    150         $text .= "\n</$sectiontag>\n" if ($sectiontag ne ""); 
     150        $text .= "\n</$sec_tag_name>\n" if ($sec_tag_name ne ""); 
    151151            $section = $doc_obj->get_next_section($section); 
    152152        next; 
     
    275275    } # foreach field 
    276276 
    277     $text .= "\n</$sectiontag>\n" if ($sectiontag ne ""); 
     277    $text .= "\n</$sec_tag_name>\n" if ($sec_tag_name ne ""); 
    278278 
    279279        $section = $doc_obj->get_next_section($section);