Enhydra 3.1 API

org.apache.xalan.xpath.xml
Class JaxpLiaison

java.lang.Object
  |
  +--org.apache.xalan.xpath.XPathSupportDefault
        |
        +--org.apache.xalan.xpath.xml.XMLParserLiaisonDefault
              |
              +--org.apache.xalan.xpath.xml.JaxpLiaison

public class JaxpLiaison
extends XMLParserLiaisonDefault

Allow use of a generic JAXP parser with Xalan. Patch from Costin Manolache


Fields inherited from class org.apache.xalan.xpath.xml.XMLParserLiaisonDefault
m_acceptLanguage, m_attrSpecialChars, m_candidateNoAncestorXMLNS, m_dataProviders, m_docHandler, m_document, m_DOMFactory, m_DTDHandler, m_entityResolver, m_envSupport, m_errorHandler, m_extensionFunctionNamespaces, m_formatterListener, m_indent, m_isDefaultUseValidation, m_locale, m_NSInfoNullNoAncestorXMLNS, m_NSInfoNullWithoutXMLNS, m_NSInfoNullWithXMLNS, m_NSInfoUnProcNoAncestorXMLNS, m_NSInfoUnProcWithoutXMLNS, m_NSInfoUnProcWithXMLNS, m_processNamespaces, m_shouldExpandEntityRefs, m_use_validation
 
Constructor Summary
JaxpLiaison()
           
 
Method Summary
 void checkNode(Node node)
          Check node to see if it matches this liaison.
 Document createDocument()
          Create an empty DOM Document.
 Document getDocument()
          Returns the document just parsed.
 Element getElementByID(java.lang.String id, Document doc)
          Given an ID, return the element.
 java.lang.String getParserDescription()
          Return a string suitible for telling the user what parser is being used.
 void parse(InputSource source)
          Parse an XML document.
 boolean supportsSAX()
          Returns true if the liaison supports the SAX DocumentHandler interface.
 
Methods inherited from class org.apache.xalan.xpath.xml.XMLParserLiaisonDefault
addExtensionElementNamespace, addExtensionNamespace, associateXLocatorToNode, copyFromOtherLiaison, createXLocatorHandler, deassociateXLocatorToNode, elementAvailable, error, error, error, extFunction, findURIFromDoc, functionAvailable, getAcceptLanguage, getCallback, getCallbackInfo, getDefaultXPathFactory, getDOMFactory, getEntityResolver, getErrorHandler, getExpandedAttributeName, getExpandedElementName, getIndent, getLocalNameOfNode, getNamespaceForPrefix, getNamespaceOfNode, getNodeData, getNodeData, getNodeSetByKey, getParentOfNode, getProblemListener, getProcessNamespaces, getRoot, getShouldExpandEntityRefs, getSourceDocsTable, getSpecialCharacters, getThrowFoundIndex, getUnparsedEntityURI, getURLFromString, getUseValidation, getVariable, getXLocatorFromNode, isIgnorableWhitespace, parse, problem, reset, setAcceptLanguage, setCallback, setDocumentHandler, setDOMFactory, setDTDHandler, setEntityResolver, setEnvSupport, setErrorHandler, setIndent, setLocale, setProblemListener, setProcessNamespaces, setShouldExpandEntityRefs, setSpecialCharacters, setThrowFoundIndex, setUseDOM2getNamespaceURI, setUseValidation, shouldStripSourceNode, toMarkup, toMarkup, warn, warn, warn, warning
 
Methods inherited from class org.apache.xalan.xpath.XPathSupportDefault
beginConstruction, decrementContextNodePosition, endConstruction, getContextNodeList, getContextNodePosition, getCurrentNode, getInConstruction, getNamespaceContext, getNodeNumber, incrementContextNodePosition, parseXML, parseXML, popContextNodeList, popContextNodePosition, popXPathContext, pushContextNodeList, pushContextNodePosition, pushDummyXPathContext, pushXPathContext, reExecuteXPathContext, setContextNodePosition, setCurrentNode, setNamespaceContext, supportsNodeNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JaxpLiaison

public JaxpLiaison()
Method Detail

getParserDescription

public java.lang.String getParserDescription()
Description copied from class: XMLParserLiaisonDefault
Return a string suitible for telling the user what parser is being used.
Overrides:
getParserDescription in class XMLParserLiaisonDefault

checkNode

public void checkNode(Node node)
               throws SAXException
Description copied from class: XMLParserLiaisonDefault
Check node to see if it matches this liaison.
Overrides:
checkNode in class XMLParserLiaisonDefault

supportsSAX

public boolean supportsSAX()
Description copied from class: XMLParserLiaisonDefault
Returns true if the liaison supports the SAX DocumentHandler interface. The default is that the parser does not support the SAX interface.
Overrides:
supportsSAX in class XMLParserLiaisonDefault

parse

public void parse(InputSource source)
           throws SAXException,
                  java.io.IOException
Description copied from class: XMLParserLiaisonDefault
Parse an XML document.

The application can use this method to instruct the SAX parser to begin parsing an XML document from any valid input source (a character stream, a byte stream, or a URI).

Applications may not invoke this method while a parse is in progress (they should create a new Parser instead for each additional XML document). Once a parse is complete, an application may reuse the same Parser object, possibly with a different input source.

This method needs to be overridden by a derived class.

Overrides:
parse in class XMLParserLiaisonDefault
Tags copied from class: XMLParserLiaisonDefault
Parameters:
source - The input source for the top-level of the XML document.
Throws:
SAXException - Any SAX exception, possibly wrapping another exception.
java.io.IOException - An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.
See Also:
InputSource, XMLParserLiaisonDefault.parse(java.lang.String), XMLParserLiaisonDefault.setEntityResolver(org.xml.sax.EntityResolver), XMLParserLiaisonDefault.setDTDHandler(org.xml.sax.DTDHandler), XMLParserLiaisonDefault.setDocumentHandler(org.xml.sax.DocumentHandler), XMLParserLiaisonDefault.setErrorHandler(org.xml.sax.ErrorHandler)

getDocument

public Document getDocument()
Description copied from class: XMLParserLiaisonDefault
Returns the document just parsed.
Overrides:
getDocument in class XMLParserLiaisonDefault

createDocument

public Document createDocument()
Create an empty DOM Document. Mainly used for creating an output document. Implementation of XMLParserLiaison interface method.
Overrides:
createDocument in class XMLParserLiaisonDefault

getElementByID

public Element getElementByID(java.lang.String id,
                              Document doc)
Description copied from class: XMLParserLiaisonDefault
Given an ID, return the element.
Overrides:
getElementByID in class XMLParserLiaisonDefault
Tags copied from class: XPathSupportDefault
Returns:
null, derived element must override.

Enhydra 3.1 API