Changeset 30600

Show
Ignore:
Timestamp:
04.07.2016 16:03:52 (4 years ago)
Author:
ak19
Message:

An empty metadata.xml was unrecognised by MetadataXMLPlugin because the self-closing root tag in the XML file was not matched in the regex.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/MetadataXMLPlugin.pm

    r29817 r30600  
    181181    return 1; # its a file for us 
    182182    } 
     183 
    183184    return 0; 
    184185} 
     
    194195    while (defined (my $line = <XMLIN>)) { 
    195196        ## find the root element 
    196         if ($line =~ /<([\w\d:]+)[\s>]/){ 
     197        if ($line =~ /<([\w\d:]+)[\s\/>]/){ 
    197198        my $root = $1; 
    198199        if ($root !~ $doctype){