Changeset 21928


Ignore:
Timestamp:
2010-04-20T17:58:15+12:00 (11 years ago)
Author:
ak19
Message:

Kathy improved some code to deal with my converting formatted strings (containing newlines) into XML (so that it contains empty elements).

File:
1 edited

Legend:

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

    r19984 r21928  
    283283    // process the metadata requests
    284284    Element metadata_response = (Element)this.mr.process(metadata_message);
    285         if (did_classifier) {
     285    if (did_classifier) {
    286286        // the classifier one will be the first response
    287287        // add the metadata lists for each node back into the
     
    293293            return page_response;
    294294        }
    295         NodeList meta_response_cls = pathNode.getChildNodes();
     295        //NodeList meta_response_cls = (Element)pathNode.getChildNodes(); // can't handle empty elements from converting formatted strings (with empty newlines) into XML
     296        NodeList meta_response_cls = ((Element)pathNode).getElementsByTagName(GSXML.CLASS_NODE_ELEM);
    296297        for (int i = 0; i < cl_nodes.getLength(); i++) {
    297298        GSXML.mergeMetadataLists(cl_nodes.item(i), meta_response_cls.item(i));
    298        
    299299        }
    300300    }
Note: See TracChangeset for help on using the changeset viewer.