Xalan-Java: Class XercesLiaison

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xalan.xpath.xdom
Class XercesLiaison

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

Direct Known Subclasses:
  DTMLiaison

public class XercesLiaison
extends XMLParserLiaisonDefault
implements XPathSupport

Provides XSLTProcessor an interface to the Xerces XML parser. This liaison should be used if Xerces DOM nodes are being process as the source tree or as the result tree.

See Also:
  `XSLTProcessor`, `org.apache.xml.parsers`

Fields inherited from class org.apache.xalan.xpath.xml.XMLParserLiaisonDefault
`m_attrSpecialChars, m_extensionFunctionNamespaces`

Constructor Summary
`XercesLiaison()` Construct an instance.
`XercesLiaison(org.xml.sax.ErrorHandler errorHandler)` Constructor that takes SAX ErrorHandler as an argument.
`XercesLiaison(XPathEnvSupport envSupport)` Construct an instance.

Method Summary
`void` | `checkNode(org.w3c.dom.Node node)` **For internal use only** Check node to see if it matches this liaison.
`void` | `copyFromOtherLiaison(XMLParserLiaisonDefault from)`
`org.w3c.dom.Document` | `createDocument()` Create an empty DOM Document.
`org.w3c.dom.Element` | `getElementByID(java.lang.String id, org.w3c.dom.Document doc)` Given an ID, return the element.
`java.lang.String` | `getNamespaceOfNode(org.w3c.dom.Node n)` Get the namespace of the node.
`org.w3c.dom.Node` | `getParentOfNode(org.w3c.dom.Node node)` Get the parent of a node.
`java.lang.String` | `getParserDescription()` Return a string suitible for telling the user what parser is being used.
`boolean` | `isIgnorableWhitespace(org.w3c.dom.Text node)` Deprecated.
`void` | `parse(org.xml.sax.InputSource source)` **For internal use only** Parse an XML document.
`void` | `setUseDOM2getNamespaceURI(boolean b)` Set whether or not getNamespaceOfNode should use the Xerces/DOM2 getNamespaceURI.
`boolean` | `supportsSAX()` Returns true that this implementation does support the SAX DocumentHandler interface.

Methods inherited from class org.apache.xalan.xpath.xml.XMLParserLiaisonDefault
`addExtensionElementNamespace, addExtensionNamespace, associateXLocatorToNode, createXLocatorHandler, deassociateXLocatorToNode, elementAvailable, error, error, error, extFunction, findURIFromDoc, functionAvailable, getAcceptLanguage, getCallback, getCallbackInfo, getDefaultXPathFactory, getDocument, getDOMFactory, getEntityResolver, getErrorHandler, getExpandedAttributeName, getExpandedElementName, getIndent, getLocalNameOfNode, getNamespaceForPrefix, getNodeData, getNodeData, getNodeSetByKey, getProblemListener, getProcessNamespaces, getRoot, getShouldExpandEntityRefs, getSourceDocsTable, getSpecialCharacters, getThrowFoundIndex, getUnparsedEntityURI, getURLFromString, getUseValidation, getVariable, getXLocatorFromNode, parse, problem, reset, setAcceptLanguage, setCallback, setDocumentHandler, setDOMFactory, setDTDHandler, setEntityResolver, setEnvSupport, setErrorHandler, setIndent, setLocale, setProblemListener, setProcessNamespaces, setShouldExpandEntityRefs, setSpecialCharacters, setThrowFoundIndex, 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
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XercesLiaison

    public XercesLiaison(org.xml.sax.ErrorHandler errorHandler)

  Constructor that takes SAX ErrorHandler as an argument. The error handler is registered with the XML Parser. Any XML-related errors will be reported to the calling application using this error handler.
  Parameters:
    `errorHandler` - SAX ErrorHandler instance.

### XercesLiaison

    public XercesLiaison(XPathEnvSupport envSupport)

  Construct an instance.

### XercesLiaison

    public XercesLiaison()

  Construct an instance.

Method Detail

### getParserDescription

    public java.lang.String getParserDescription()

  Return a string suitible for telling the user what parser is being used.
  Overrides:
    getParserDescription in class XMLParserLiaisonDefault

### checkNode

    public void checkNode(org.w3c.dom.Node node)
                   throws org.xml.sax.SAXException

  **For internal use only** Check node to see if it matches this liaison.
  Overrides:
    checkNode in class XMLParserLiaisonDefault

### supportsSAX

    public boolean supportsSAX()

  Returns true that this implementation does support the SAX DocumentHandler interface.
  Overrides:
    supportsSAX in class XMLParserLiaisonDefault

### parse

    public void parse(org.xml.sax.InputSource source)
               throws org.xml.sax.SAXException,
                      java.io.IOException

  **For internal use only** 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.

  Parameters:
    `source` - The input source for the top-level of the XML document.
  Throws:
    org.xml.sax.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.
  Overrides:
    parse in class XMLParserLiaisonDefault
  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)`

### copyFromOtherLiaison

    public void copyFromOtherLiaison(XMLParserLiaisonDefault from)
                              throws org.xml.sax.SAXException

  Overrides:
    copyFromOtherLiaison in class XMLParserLiaisonDefault

### createDocument

    public org.w3c.dom.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 org.w3c.dom.Element getElementByID(java.lang.String id,
                                              org.w3c.dom.Document doc)

  Given an ID, return the element.
  Specified by:
    getElementByID in interface XPathSupport
  Overrides:
    getElementByID in class XMLParserLiaisonDefault

### isIgnorableWhitespace

    public boolean isIgnorableWhitespace(org.w3c.dom.Text node)

  Deprecated.
  Tell if the node is ignorable whitespace.
  Specified by:
    isIgnorableWhitespace in interface XPathSupport
  Overrides:
    isIgnorableWhitespace in class XMLParserLiaisonDefault

### setUseDOM2getNamespaceURI

    public void setUseDOM2getNamespaceURI(boolean b)

  Set whether or not getNamespaceOfNode should use the Xerces/DOM2 getNamespaceURI. This has to be set to true if the http://xml.org/sax/features/namespaces is set to false, or if the tree is mutated.
  Overrides:
    setUseDOM2getNamespaceURI in class XMLParserLiaisonDefault

### getNamespaceOfNode

    public java.lang.String getNamespaceOfNode(org.w3c.dom.Node n)

  Get the namespace of the node. Calls org.apache.xerces.dom.NodeImpl's getNamespaceURI() if setUseDOM2getNamespaceURI(true) has been called.
  Specified by:
    getNamespaceOfNode in interface XPathSupport
  Overrides:
    getNamespaceOfNode in class XMLParserLiaisonDefault

### getParentOfNode

    public org.w3c.dom.Node getParentOfNode(org.w3c.dom.Node node)
                                     throws java.lang.RuntimeException

  Get the parent of a node.
  Specified by:
    getParentOfNode in interface XPathSupport
  Overrides:
    getParentOfNode in class XMLParserLiaisonDefault

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 Apache XML Project. All Rights Reserved.