Ignore:
Timestamp:
2008-08-08T13:23:59+12:00 (16 years ago)
Author:
davidb
Message:

Changed 'Element process(Element)' in ModuleInterface to 'Node process(Node)'. After some deliberation is was decided this is a more useful (generic) layer of the DOM to pass information around in. Helps with the DocType problem when producing XSL Transformed pages, for example. When this was an Element, it would loose track of its DocType. Supporting method provided in XMLConverter 'Element nodeToElement(Node)' which checks a nodes docType and casts to Element if appropriate, or if a Document, typecasts to that and then extracts the top-level Element. With this fundamental change in ModuleInterface, around 20 files needed to be updated (Actions, Services, etc) that build on top of 'process()' to reflect this change, and use nodeToElement where necessary.

File:
1 edited

Legend:

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

    r14528 r16688  
    171171        return null;
    172172    }
    173     Element res = process(doc.getDocumentElement());
     173    Node res = process(doc);
    174174    return this.converter.getString(res);
    175175   
     
    178178    /** process an XML request in DOM form
    179179     *
    180      * @param xml_in the Element node containing the request
     180     * @param message the Node node containing the request
    181181     * should be <message>
    182      * @return an Element with the result XML
    183      * @see Element
     182     * @return an Node with the result XML
     183     * @see Node/Element
    184184     */
    185     public Element process(Element message) {
     185    public Node process(Node message_node) {
     186
     187    Element message = this.converter.nodeToElement(message_node);
    186188
    187189    NodeList requests = message.getElementsByTagName(GSXML.REQUEST_ELEM);
Note: See TracChangeset for help on using the changeset viewer.