com.jclark.xsl.sax2

Class XMLProcessorImpl

Implemented Interfaces:
XMLProcessor, XMLProcessorEx

public class XMLProcessorImpl
extends java.lang.Object
implements XMLProcessorEx

Builds an object model from a SAX event stream

Constructor Summary

XMLProcessorImpl()
XMLProcessorImpl(XMLReader reader)
construct with a SAX2 XML Reader we may wish to re-use for resolving e.g xsl:include

Method Summary

static SAXTwoOMBuilder
createBuilder(String systemId, int documentIndex, LoadContext context, NameTable nameTable)
Result
createResult(Node baseNode, int documentIndex, LoadContext loadContext, Node[] rootNode)
Node
load(InputSource source, int documentIndex, LoadContext context, NameTable nameTable)
parse the xml stream at source building an object model of all its nodes
Node
load(URL url, int documentIndex, LoadContext context, NameTable nameTable)
void
setErrorHandler(ErrorHandler errorHandler)
void
setXMLReader(XMLReader reader)

Constructor Details

XMLProcessorImpl

public XMLProcessorImpl()


XMLProcessorImpl

public XMLProcessorImpl(XMLReader reader)
construct with a SAX2 XML Reader we may wish to re-use for resolving e.g xsl:include

Method Details

createBuilder

public static SAXTwoOMBuilder createBuilder(String systemId,
                                            int documentIndex,
                                            LoadContext context,
                                            NameTable nameTable)


createResult

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


load

public Node load(InputSource source,
                 int documentIndex,
                 LoadContext context,
                 NameTable nameTable)
            throws IOException,
                   XSLException
parse the xml stream at source building an object model of all its nodes
Specified by:
load in interface XMLProcessorEx

Returns:
the document root


load

public Node load(URL url,
                 int documentIndex,
                 LoadContext context,
                 NameTable nameTable)
            throws IOException,
                   XSLException
Specified by:
load in interface XMLProcessor

Returns:
the document root


setErrorHandler

public void setErrorHandler(ErrorHandler errorHandler)
Specified by:
setErrorHandler in interface XMLProcessorEx


setXMLReader

public void setXMLReader(XMLReader reader)