## org.apache.xalan.xpath.xml
Interface XMLParserLiaison

All Known Implementing Classes:
  XMLParserLiaisonDefault

public interface XMLParserLiaison
extends XPathSupport, org.xml.sax.Parser

An implementation of this interface acts as a liaison between the XSLT processor and the XML parser. It is needed in order to support features like included files, and to cover for deficiencies in the DOM. An implementation of this interface is a requirement for the XSL processor. While the XPathSupport methods are intended to just support XPath, the methods in this class are intended to support XSLT.

Fields inherited from class org.apache.xalan.xpath.XPathSupport
`DATASOURCE, ERROR, WARNING, XMLPARSER, XPATHPARSER, XPATHPROCESSOR, XSLTPROCESSOR`

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)` Copy attributes from another liaison.
`org.w3c.dom.Document` `createDocument()` Create an empty DOM Document.
`java.lang.String` `getAcceptLanguage()` Get language variant that should be used, passed from servlet HTTP header.
`XPathFactory` `getDefaultXPathFactory()` Get a factory to create XPaths.
`org.w3c.dom.Document` `getDocument()` Returns the document just parsed.
`org.xml.sax.EntityResolver` `getEntityResolver()` Get the EntityResolver for this liaison.
`java.lang.String` `getExpandedAttributeName(org.w3c.dom.Attr attr)` Returns the attribute name with the namespace expanded.
`java.lang.String` `getExpandedElementName(org.w3c.dom.Element elem)` Return the expanded element name.
`int` `getIndent()` Get the amount to indent when indent-result="yes".
`java.lang.String` `getParserDescription()` Return a string suitible for telling the user what parser is being used.
`ProblemListener` `getProblemListener()` Get the current problem listener.
`boolean` `getShouldExpandEntityRefs()` Get whether or not to expand all entity references in the source and style trees.
`java.lang.String` `getSpecialCharacters()` Deprecated.
`java.net.URL` `getURLFromString(java.lang.String urlString, java.lang.String base)` Take a user string and try and parse XML, and also return the url.
`boolean` `getUseValidation()` Get whether or not validation will be performed.
`void` `reset()` Reset for new run.
`void` `setAcceptLanguage(java.lang.String acceptLanguage)` Set language variant that should be used, passed from servlet HTTP header.
`void` `setEnvSupport(XPathEnvSupport envSupport)` **For advanced use only** XPath environment support, which the liaison may aggregate back to in order to implement the XPathEnvSupport interface.
`void` `setErrorHandler(org.xml.sax.ErrorHandler errorHandler)`
`void` `setIndent(int i)` Set the amount to indent when indent-result="yes".
`void` `setProblemListener(ProblemListener listener)` Set the current problem listener.
`void` `setShouldExpandEntityRefs(boolean b)` Set whether or not to expand all entity references in the source and style trees.
`void` `setSpecialCharacters(java.lang.String str)` Deprecated.
`void` `setUseDOM2getNamespaceURI(boolean v)` Set whether or not getNamespaceOfNode should use the Xerces/DOM2 getNamespaceURI.
`void` `setUseValidation(boolean b)` If set to true, validation will be performed.
`boolean` `supportsSAX()` Returns true if the liaison supports the SAX DocumentHandler interface.

Methods inherited from interface org.apache.xalan.xpath.XPathSupport

`addExtensionNamespace, beginConstruction, createXLocatorHandler, decrementContextNodePosition, endConstruction, getContextNodeList, getContextNodePosition, getCurrentNode, getElementByID, getErrorHandler, getInConstruction, getLocalNameOfNode, getNamespaceContext, getNamespaceForPrefix, getNamespaceOfNode, getNodeNumber, getParentOfNode, getProcessNamespaces, getThrowFoundIndex, getUnparsedEntityURI, incrementContextNodePosition, isIgnorableWhitespace, parseXML, popContextNodeList, popContextNodePosition, popXPathContext, problem, pushContextNodeList, pushContextNodePosition, pushDummyXPathContext, pushXPathContext, reExecuteXPathContext, setContextNodePosition, setCurrentNode, setNamespaceContext, setProcessNamespaces, setThrowFoundIndex, supportsNodeNumber`

Methods inherited from interface org.xml.sax.Parser
`parse, parse, setDocumentHandler, setDTDHandler, setEntityResolver, setLocale`

Methods inherited from interface org.apache.xalan.xpath.XPathEnvSupport
`associateXLocatorToNode, deassociateXLocatorToNode, elementAvailable, extFunction, findURIFromDoc, functionAvailable, getDOMFactory, getNodeSetByKey, getSourceDocsTable, getVariable, getXLocatorFromNode, setDOMFactory, shouldStripSourceNode`

Method Detail

### 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.

### reset

    public void reset()

  Reset for new run.

### getEntityResolver

    public org.xml.sax.EntityResolver getEntityResolver()

  Get the EntityResolver for this liaison.

### setEnvSupport

    public void setEnvSupport(XPathEnvSupport envSupport)

  **For advanced use only** XPath environment support, which the liaison may aggregate back to in order to implement the XPathEnvSupport interface.

### supportsSAX

    public boolean supportsSAX()

  Returns true if the liaison supports the SAX DocumentHandler interface.

### getDocument

    public org.w3c.dom.Document getDocument()

  Returns the document just parsed.

### createDocument

    public org.w3c.dom.Document createDocument()

  Create an empty DOM Document. Mainly used for creating an output document.

### getExpandedElementName

    public java.lang.String getExpandedElementName(org.w3c.dom.Element elem)

  Return the expanded element name.

### getExpandedAttributeName

    public java.lang.String getExpandedAttributeName(org.w3c.dom.Attr attr)

  Returns the attribute name with the namespace expanded.

### setSpecialCharacters

    public void setSpecialCharacters(java.lang.String str)

  Deprecated.
  Set special characters for attributes that will be escaped.

### getSpecialCharacters

    public java.lang.String getSpecialCharacters()

  Deprecated.
  Get special characters for attributes that will be escaped.

### getIndent

    public int getIndent()

  Get the amount to indent when indent-result="yes".

### setIndent

    public void setIndent(int i)

  Set the amount to indent when indent-result="yes".

### getShouldExpandEntityRefs

    public boolean getShouldExpandEntityRefs()

  Get whether or not to expand all entity references in the source and style trees.

### setShouldExpandEntityRefs

    public void setShouldExpandEntityRefs(boolean b)

  Set whether or not to expand all entity references in the source and style trees.

### getUseValidation

    public boolean getUseValidation()

  Get whether or not validation will be performed. Validation is off by default.

### setUseValidation

    public void setUseValidation(boolean b)

  If set to true, validation will be performed. Validation is off by default.

### getParserDescription

    public java.lang.String getParserDescription()

  Return a string suitible for telling the user what parser is being used.

### getDefaultXPathFactory

    public XPathFactory getDefaultXPathFactory()

  Get a factory to create XPaths.

### getURLFromString

    public java.net.URL getURLFromString(java.lang.String urlString,
                                         java.lang.String base)
                                  throws org.xml.sax.SAXException

  Take a user string and try and parse XML, and also return the url.
  Specified by:
    getURLFromString in interface XPathSupport
  Throws:
    XSLProcessorException - thrown if the active ProblemListener and XMLParserLiaison decide the error condition is severe enough to halt processing.

### setAcceptLanguage

    public void setAcceptLanguage(java.lang.String acceptLanguage)

  Set language variant that should be used, passed from servlet HTTP header.

### getAcceptLanguage

    public java.lang.String getAcceptLanguage()

  Get language variant that should be used, passed from servlet HTTP header.

### setProblemListener

    public void setProblemListener(ProblemListener listener)

  Set the current problem listener.

### getProblemListener

    public ProblemListener getProblemListener()

  Get the current problem listener.

### copyFromOtherLiaison

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

  Copy attributes from another liaison.

### setUseDOM2getNamespaceURI

    public void setUseDOM2getNamespaceURI(boolean v)

  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. Since it's used with casting it should be part of the liaison abstraction

### setErrorHandler

    public void setErrorHandler(org.xml.sax.ErrorHandler errorHandler)

  Specified by:
    setErrorHandler in interface org.xml.sax.Parser

Copyright © 2000 Apache XML Project. All Rights Reserved.