Changeset 29235

Show
Ignore:
Timestamp:
25.08.2014 18:00:53 (5 years ago)
Author:
ak19
Message:

Dr Bainbridge fixed another wrong document error (WRONG_DOCUMENT_ERR) to do with whether we need to cloneNodes in the same document or call importNode to copy/import the nodes into another document.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/PhindPhraseBrowse.java

    r28966 r29235  
    125125      return null; 
    126126    } 
    127     Element describe = (Element) applet_description.cloneNode(true); 
    128     describe.appendChild(GSXML.createDisplayTextElement(doc, GSXML.DISPLAY_TEXT_NAME,  getTextString(PHIND_SERVICE+".name", lang))); 
    129     describe.appendChild(GSXML.createDisplayTextElement(doc, GSXML.DISPLAY_TEXT_DESCRIPTION,  getTextString(PHIND_SERVICE+".description", lang))); 
     127    Element describe = (Element)doc.importNode(applet_description,true); 
     128     
     129    Element el1 = GSXML.createDisplayTextElement(doc, GSXML.DISPLAY_TEXT_NAME,  getTextString(PHIND_SERVICE+".name", lang));     
     130    describe.appendChild(el1); 
     131     
     132    Element el2 = GSXML.createDisplayTextElement(doc, GSXML.DISPLAY_TEXT_DESCRIPTION,  getTextString(PHIND_SERVICE+".description", lang)); 
     133    describe.appendChild(el2); 
     134     
    130135    return describe; 
    131136  }