Changeset 28947 for main


Ignore:
Timestamp:
03/24/14 14:32:56 (7 years ago)
Author:
kjdon
Message:

need to import replacement node into current document before adding it in, otherwise get wrong document error

File:
1 edited

Legend:

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

    r28382 r28947  
    256256                        {
    257257                            Element parent = (Element) currentElem.getParentNode();
    258                             parent.insertBefore(replacementElem, currentElem);
     258                            parent.insertBefore(parent.getOwnerDocument().importNode(replacementElem, true), currentElem); // wrong doc node!!!
    259259                            parent.removeChild(currentElem);
    260260                            break;
     
    294294                        {
    295295                            Element parent = (Element) currentElem.getParentNode();
    296                             parent.insertBefore(replacementElem, currentElem);
     296                            parent.insertBefore(parent.getOwnerDocument().importNode(replacementElem,true), currentElem);
    297297                            parent.removeChild(currentElem);
    298298                            break;
Note: See TracChangeset for help on using the changeset viewer.