Changeset 25793

Show
Ignore:
Timestamp:
14.06.2012 20:39:57 (7 years ago)
Author:
ak19
Message:

Fixed a bug where the requested metadata for a classifierNode format statement wasn't being passed on to getRequiredMetadataNames() since the java code tried to match on a format statement's template named classifierNode exactly, rather than match on a format statement's template name that starts with classifierNode. As a consequence of this bugfix, the request for numleafdocs metadata works again.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/GS2BrowseAction.java

    r25693 r25793  
    446446            Element template = (Element) templates.item(i); 
    447447            String match = template.getAttribute("match"); 
    448             if (match.equals("documentNode")) 
     448            if (match.startsWith("documentNode")) 
    449449            { 
    450450                getRequiredMetadataNames(template, doc_meta_names); 
    451451            } 
    452             else if (match.equals("classifierNode")) 
     452            else if (match.startsWith("classifierNode")) // not match.equals, as we want to match nodes like: classifierNode[@classifierStyle = 'VList'] 
    453453            { 
    454454                getRequiredMetadataNames(template, class_meta_names);