com.jclark.xsl.dom
Class XMLProcessorImpl

java.lang.Object
  |
  +--com.jclark.xsl.dom.XMLProcessorImpl
All Implemented Interfaces:
DOMExtensions, XMLProcessor, XMLProcessorEx

public abstract class XMLProcessorImpl
extends java.lang.Object
implements XMLProcessorEx, DOMExtensions

builds a om.Node from a DOM implementation


Constructor Summary
XMLProcessorImpl()
           
 
Method Summary
 Result createResult(Node baseNode, int documentIndex, LoadContext loadContext, Node[] rootNodeRef)
           
 org.w3c.dom.Element getElementById(org.w3c.dom.Document doc, java.lang.String str)
           
abstract  org.w3c.dom.Document load(org.xml.sax.InputSource input)
           
 Node load(org.xml.sax.InputSource source, int documentIndex, LoadContext context, NameTable nameTable)
           
 Node load(java.net.URL url, int documentIndex, LoadContext context, NameTable nameTable)
          construct an object model from the XML source at the given URL.
 void setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLProcessorImpl

public XMLProcessorImpl()
Method Detail

load

public Node load(java.net.URL url,
                 int documentIndex,
                 LoadContext context,
                 NameTable nameTable)
          throws java.io.IOException,
                 XSLException
Description copied from interface: XMLProcessor
construct an object model from the XML source at the given URL.
Specified by:
load in interface XMLProcessor
Following copied from interface: com.jclark.xsl.tr.XMLProcessor
Parameters:
url - the source XML
documentIndex - an internal identifier for this document
loadContext - parameters controlling whether e.g. comment nodes should be included in the model
nameTable - initial set of in-scope namespace bindings

load

public Node load(org.xml.sax.InputSource source,
                 int documentIndex,
                 LoadContext context,
                 NameTable nameTable)
          throws java.io.IOException,
                 XSLException
Specified by:
load in interface XMLProcessorEx
Following copied from interface: com.jclark.xsl.sax.XMLProcessorEx
Parameters:
source - the input to our parser
documentIndex - so we can distinguish between nodes in different docs
context - ??
nameTable - we intern names to avoid wasting menmory

setErrorHandler

public void setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
Specified by:
setErrorHandler in interface XMLProcessorEx
Following copied from interface: com.jclark.xsl.sax.XMLProcessorEx
Parameters:
ErrorHandler - a SAX errorHandler where we report parse errors

load

public abstract org.w3c.dom.Document load(org.xml.sax.InputSource input)
                                   throws java.io.IOException,
                                          org.xml.sax.SAXException

getElementById

public org.w3c.dom.Element getElementById(org.w3c.dom.Document doc,
                                          java.lang.String str)
Specified by:
getElementById in interface DOMExtensions

createResult

public Result createResult(Node baseNode,
                           int documentIndex,
                           LoadContext loadContext,
                           Node[] rootNodeRef)
                    throws XSLException
Specified by:
createResult in interface XMLProcessor