Ignore:
Timestamp:
2003-03-26T12:45:21+12:00 (21 years ago)
Author:
kjdon
Message:

new page format

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/action/ProcessAction.java

    r3987 r4001  
    3838    Element page = doc_.createElement(GSXML.PAGE_ELEM);
    3939    page.setAttribute(GSXML.LANG_ATT, request.getAttribute(GSXML.LANG_ATT));
    40     System.out.println("(ProcessAction) Page:\n" + converter_.getPrettyString(page));
    4140
     41    // the page response goes into a pageResponse elem
     42    Element page_response = doc_.createElement(GSXML.PAGE_RESPONSE_ELEM);
     43    page.appendChild(page_response);
    4244    // what is carried out depends on the request_type
    4345    // if rt=d, then a describe request is done,
     
    100102        }
    101103       
    102         // else append the response to the page
    103         page.appendChild(doc_.importNode(result_response, true));
     104        // else append the contents of the response to the page - just the status elem for now
     105        Element status = (Element)GSXML.getChildByTagName(result_response, GSXML.STATUS_ELEM);
     106        page_response.appendChild(doc_.importNode(status, true));
    104107    }
    105108   
     
    146149        }
    147150    }
    148     page.appendChild(description);
     151    page_response.appendChild(description);
    149152
    150153    // part of the data for the page is the cgi-params
    151154    // if we have this here, do we need to do the previous step?
    152     Element cgi_request = (Element)doc_.importNode(request, true);
    153     page.appendChild(cgi_request);
    154    
     155    Element page_request = GSXML.duplicateWithNewName(doc_, request, GSXML.PAGE_REQUEST_ELEM, true);
     156    page.appendChild(page_request);
     157       
    155158    // now process the page and return the result
    156159    Document style_doc = converter_.getDOM(new File(stylesheet));
Note: See TracChangeset for help on using the changeset viewer.