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/core/ModuleInterface.java

    r9874 r16688  
    1919package org.greenstone.gsdl3.core;
    2020   
    21 import org.w3c.dom.Element;                                               
     21import org.w3c.dom.Node;
    2222
    2323/**
     
    2727 * it takes a String of XML, and returns a String of XML
    2828 *
    29  * the more efficient process method uses DOM Element Nodes instead
     29 * the more efficient process method uses DOM Nodes instead
    3030 * of Strings - this avoids parsing the XML at each module
    3131 *
     
    4545
    4646  /**
    47    * Process an XML request - as a DOM model Element
     47   * Process an XML request - as a DOM model Node
    4848   *
    4949   * @param xml_in the request to process
    5050   * @return the response - contains any error messages
    51    * @see org.w3c.dom.Element
     51   * @see org.w3c.dom.Node
    5252   */
    53     abstract public Element process(Element xml_in);
     53    abstract public Node process(Node xml_in);
    5454
    5555    /**
Note: See TracChangeset for help on using the changeset viewer.