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

WebLogic Server 6.0sp2 API Reference

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

    java.lang.Object
      |
      +--weblogic.apache.xalan.xpath.XPathSupportDefault
            |
            +--weblogic.apache.xalan.xpath.xml.XMLParserLiaisonDefault
                  |
                  +--weblogic.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.

This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.

Author:
  Copyright © 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
  `XSLTProcessor`, `weblogic.apache.xml.parsers`

Field Summary
`protected int` | `m_parseCountSinceGC` Count the parses since the last garbage collection.
`protected boolean` | `m_useDOM2getNamespaceURI`

Fields inherited from class weblogic.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
`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)` 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)` 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 weblogic.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 weblogic.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`

Field Detail

### m_parseCountSinceGC

    protected int m_parseCountSinceGC

  Count the parses since the last garbage collection. GC every 10 parses or so. (This might be a bad idea, but it seems to help...)

### m_useDOM2getNamespaceURI

    protected boolean m_useDOM2getNamespaceURI

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

  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

  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 weblogic.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
| Documentation is available at http://e-docs.bea.com/wls/docs60
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD