Changeset 32348 for main/trunk

Show
Ignore:
Timestamp:
20.08.2018 21:45:39 (14 months ago)
Author:
litvinovg
Message:

Fixed no metadata problem using relative link to access document.

Files:
1 modified

Legend:

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

    r32128 r32348  
    590590        for (int i = 0; i < doc_nodes.getLength(); i++) 
    591591        { 
     592            Node dcNode; 
    592593            String node_idd = ((Element)doc_nodes.item(i)).getAttribute(GSXML.NODE_ID_ATT); 
    593             Node dcNode = GSXML.getNamedElement(dm_response_doc_list, "documentNode", GSXML.NODE_ID_ATT, node_idd); 
     594            if (node_idd.isEmpty()) { 
     595                String href_id_att = ((Element)doc_nodes.item(i)).getAttribute(GSXML.HREF_ID_ATT); 
     596                dcNode = GSXML.getNamedElement(dm_response_doc_list, "documentNode", GSXML.HREF_ID_ATT, href_id_att); 
     597            } else { 
     598                dcNode = GSXML.getNamedElement(dm_response_doc_list, "documentNode", GSXML.NODE_ID_ATT, node_idd);   
     599            } 
    594600            GSXML.mergeMetadataLists(doc_nodes.item(i), dcNode); 
    595601        }