Changeset 17598


Ignore:
Timestamp:
2008-10-24T11:04:18+13:00 (15 years ago)
Author:
kjdon
Message:

when we are writing out metadata and adding on the namespace we first should check whether there is one already there or not. I have chosen to remove the existing namespace and add on the new one. is this right? also, am testing for namespace by presence of . (dot).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/bin/script/explode_metadata_database.pl

    r17563 r17598  
    466466    # $value =~ s/&([^;\s]*(\s|$))/&$1/g;
    467467
    468     print $metadata_xml_file "      <Metadata mode=\"accumulate\" name=\"$meta_prefix$field\">$value</Metadata>\n";
     468    # do we already have a namespace specified?
     469    my $full_field = $field;
     470    if ($meta_prefix ne "") {
     471        $full_field =~ s/^\w+\.//;
     472        $full_field = $meta_prefix.$full_field;
     473    }
     474
     475    print $metadata_xml_file "      <Metadata mode=\"accumulate\" name=\"$full_field\">$value</Metadata>\n";
    469476    }
    470477
Note: See TracChangeset for help on using the changeset viewer.