Xalan-Java: 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

## org.apache.xalan.xpath.xml
Class XMLParserLiaisonDefault

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

Direct Known Subclasses:
  JaxpLiaison, XercesLiaison

public class XMLParserLiaisonDefault
extends XPathSupportDefault
implements XMLParserLiaison

This class is the default XMLParserLiaison for the XSL Processor. It can be used alone, for programmatically built DOMs (I expect this use will be very rare), or it can be derived from, in order to make parser specific implementations.

Field Summary
`java.lang.String` | `m_attrSpecialChars` These are characters that will be escaped in the output.
`java.util.Hashtable` | `m_extensionFunctionNamespaces` **For internal use only** Table of extensions that may be called from the expression language via the call(name, ...) function.

Constructor Summary
`XMLParserLiaisonDefault()` Construct an instance.
`XMLParserLiaisonDefault(ProblemListener problemListener)` Construct an instance.

Method Summary
`void` | `addExtensionElementNamespace(java.lang.String uri, ExtensionFunctionHandler extNS)` **For advanced use only** Register an element extension namespace handler.
`void` | `addExtensionNamespace(java.lang.String uri, ExtensionFunctionHandler extNS)` **For advanced use only** Register an extension namespace handler.
`void` | `associateXLocatorToNode(org.w3c.dom.Node node, XLocator xlocator)` **For advanced use only** Associate an XLocator provider to a node.
`void` | `checkNode(org.w3c.dom.Node node)` 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.
`XLocator` | `createXLocatorHandler()` **For advanced use only** getXLocatorHandler.
`void` | `deassociateXLocatorToNode(org.w3c.dom.Node node)` **For advanced use only** Associate an XLocator provider to a node.
`boolean` | `elementAvailable(java.lang.String ns, java.lang.String funcName)` Execute the element-available() function.
`void` | `error(int msg)` Tell the user of an error, and probably throw an exception.
`void` | `error(org.w3c.dom.Node sourceNode, int msg)` Tell the user of an error, and probably throw an exception.
`void` | `error(org.w3c.dom.Node sourceNode, int msg, java.lang.Object[] args)` Tell the user of an error, and probably throw an exception.
`java.lang.Object` | `extFunction(java.lang.String ns, java.lang.String funcName, java.util.Vector argVec, java.lang.Object methodKey)` Handle an extension function.
`java.lang.String` | `findURIFromDoc(org.w3c.dom.Document owner)` Given a document, find the URL associated with that document.
`boolean` | `functionAvailable(java.lang.String ns, java.lang.String funcName)` Execute the function-available() function.
`java.lang.String` | `getAcceptLanguage()` Get language variant that should be used, passed from servlet HTTP header.
`NodeCallback` | `getCallback()` **Experimental** Get the callback that may be called by XPath as nodes are located.
`java.lang.Object` | `getCallbackInfo()` Get the object that will be passed to the processLocatedNode method.
`XPathFactory` | `getDefaultXPathFactory()` Get a factory to create XPaths.
`org.w3c.dom.Document` | `getDocument()` Returns the document just parsed.
`org.w3c.dom.Document` | `getDOMFactory()` Get the factory object required to create DOM nodes in the result tree.
`org.w3c.dom.Element` | `getElementByID(java.lang.String id, org.w3c.dom.Document doc)` Given an ID, return the element.
`org.xml.sax.EntityResolver` | `getEntityResolver()` Get the EntityResolver for this liaison.
`org.xml.sax.ErrorHandler` | `getErrorHandler()` Get the current error handler, if there is one.
`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)` Returns the element name with the namespace expanded.
`int` | `getIndent()` Get the amount to indent when indent-result="yes".
`java.lang.String` | `getLocalNameOfNode(org.w3c.dom.Node n)` Returns the local name of the given node.
`java.lang.String` | `getNamespaceForPrefix(java.lang.String prefix, org.w3c.dom.Element namespaceContext)` Given a prefix and a namespace context, return the expanded namespace.
`java.lang.String` | `getNamespaceOfNode(org.w3c.dom.Node n)` Returns the namespace of the given node.
`static java.lang.String` | `getNodeData(org.w3c.dom.Node node)` Get the textual contents of the node.
`static void` | `getNodeData(org.w3c.dom.Node node, java.lang.StringBuffer buf)` Get the textual contents of the node.
`org.w3c.dom.NodeList` | `getNodeSetByKey(org.w3c.dom.Node doc, java.lang.String name, java.lang.String ref, PrefixResolver nscontext)` Given a valid element key, return the corresponding node list.
`org.w3c.dom.Node` | `getParentOfNode(org.w3c.dom.Node node)` I have to write this silly, and expensive function, because the DOM WG decided that attributes don't have parents.
`java.lang.String` | `getParserDescription()` Return a string suitible for telling the user what parser is being used.
`ProblemListener` | `getProblemListener()` Set the current problem listener.
`boolean` | `getProcessNamespaces()` Deprecated.
`org.w3c.dom.Node` | `getRoot(org.w3c.dom.Node node)` Get the first unparented node in the ancestor chain.
`boolean` | `getShouldExpandEntityRefs()` get whether or not to expand all entity references in the source and style trees.
`java.util.Hashtable` | `getSourceDocsTable()`
`java.lang.String` | `getSpecialCharacters()` Deprecated.
`boolean` | `getThrowFoundIndex()` **For internal use only** ThrowFoundIndex tells if FoundIndex should be thrown if index is found.
`java.lang.String` | `getUnparsedEntityURI(java.lang.String name, org.w3c.dom.Document doc)` The getUnparsedEntityURI function returns the URI of the unparsed entity with the specified name in the same document as the context node (see [3.3 Unparsed Entities]).
`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()` If set to true, validation will be performed, if set to false, validation will not be performed.
`XObject` | `getVariable(QName name)` Given a name, locate a variable in the current context, and return the Object.
`XLocator` | `getXLocatorFromNode(org.w3c.dom.Node node)` **For advanced use only** Get an XLocator provider keyed by node.
`boolean` | `isIgnorableWhitespace(org.w3c.dom.Text node)` Deprecated.
`void` | `parse(org.xml.sax.InputSource source)` Parse an XML document.
`void` | `parse(java.lang.String systemId)` Parse an XML document from a system identifier (URI).
`boolean` | `problem(short where, short classification, org.w3c.dom.Node styleNode, org.w3c.dom.Node sourceNode, java.lang.String msg, int lineNo, int charOffset)` Function that is called when a problem event occurs.
`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` | `setCallback(NodeCallback callback, java.lang.Object callbackInfo)` **Experimental** Set a callback that may be called by XPath as nodes are located.
`void` | `setDocumentHandler(org.xml.sax.DocumentHandler handler)` Allow an application to register a document event handler.
`void` | `setDOMFactory(org.w3c.dom.Document domFactory)` Get the factory object required to create DOM nodes in the result tree.
`void` | `setDTDHandler(org.xml.sax.DTDHandler handler)` Allow an application to register a DTD event handler.
`void` | `setEntityResolver(org.xml.sax.EntityResolver resolver)` Allow an application to register a custom entity resolver.
`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 handler)` Allow an application to register an error event handler.
`void` | `setIndent(int i)` Set the amount to indent when indent-result="yes".
`void` | `setLocale(java.util.Locale locale)` Allow an application to request a locale for errors and warnings.
`void` | `setProblemListener(ProblemListener listener)` Set the current problem listener.
`void` | `setProcessNamespaces(boolean processNamespaces)` Deprecated.
`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` | `setThrowFoundIndex(boolean b)` **For internal use only** ThrowFoundIndex tells if FoundIndex should be thrown if index is found.
`void` | `setUseDOM2getNamespaceURI(boolean v)`
`void` | `setUseValidation(boolean b)` If set to true, validation will be performed, if set to false, validation will not be performed.
`boolean` | `shouldStripSourceNode(org.w3c.dom.Node textNode)` **For advanced use only** Tells, through the combination of the default-space attribute on xsl:stylesheet, xsl:strip-space, xsl:preserve-space, and the xml:space attribute, whether or not extra whitespace should be stripped from the node.
`boolean` | `supportsSAX()` Returns true if the liaison supports the SAX DocumentHandler interface.
`void` | `toMarkup(org.w3c.dom.Document doc, java.io.OutputStream ostream, java.lang.String method, java.lang.String version, boolean doIndent, int indent, java.lang.String encoding, java.lang.String mediaType, java.lang.String doctypeSystem, java.lang.String doctypePublic, boolean omitXMLDeclaration, boolean standalone, java.lang.String[] cdataSectionElems)` Deprecated.
`void` | `toMarkup(org.w3c.dom.Document doc, java.io.Writer writer, java.lang.String method, java.lang.String version, boolean doIndent, int indent, java.lang.String encoding, java.lang.String mediaType, java.lang.String doctypeSystem, java.lang.String doctypePublic, boolean omitXMLDeclaration, boolean standalone, java.lang.String[] cdataSectionElems)` Deprecated.
`void` | `warn(int msg)` Warn the user of an problem.
`void` | `warn(org.w3c.dom.Node sourceNode, int msg)` Warn the user of an problem.
`void` | `warn(org.w3c.dom.Node sourceNode, int msg, java.lang.Object[] args)` Warn the user of an problem.
`void` | `warning(int msg)` Warn the user of an problem.

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`

Field Detail

### m_attrSpecialChars

    public java.lang.String m_attrSpecialChars

  These are characters that will be escaped in the output.

### m_extensionFunctionNamespaces

    public java.util.Hashtable m_extensionFunctionNamespaces

  **For internal use only** Table of extensions that may be called from the expression language via the call(name, ...) function. Objects are keyed on the call name.
  See Also:
    `extensions.html.`

Constructor Detail

### XMLParserLiaisonDefault

    public XMLParserLiaisonDefault(ProblemListener problemListener)

  Construct an instance.

### XMLParserLiaisonDefault

    public XMLParserLiaisonDefault()

  Construct an instance.

Method Detail

### setProblemListener

    public void setProblemListener(ProblemListener listener)

  Set the current problem listener.
  Specified by:
    setProblemListener in interface XMLParserLiaison

### getProblemListener

    public ProblemListener getProblemListener()

  Set the current problem listener.
  Specified by:
    getProblemListener in interface XMLParserLiaison

### reset

    public void reset()

  Reset for new run.
  Specified by:
    reset in interface XMLParserLiaison

### getEntityResolver

    public org.xml.sax.EntityResolver getEntityResolver()

  Get the EntityResolver for this liaison.
  Specified by:
    getEntityResolver in interface XMLParserLiaison

### setCallback

    public void setCallback(NodeCallback callback,
                            java.lang.Object callbackInfo)

  **Experimental** Set a callback that may be called by XPath as nodes are located. The callback will only be called if the XLocator determines that the location path can process the nodes in document order. If the callback is called, the nodes will not be put into the node list, and the LocationPath will return an empty node list. The callback will be set to null after the next LocationPath or Union is processed.
  Parameters:
    `callback` - Interface that implements the processLocatedNode method.
    `callbackInfo` - Object that will be passed to the processLocatedNode method.
  Overrides:
    setCallback in class XPathSupportDefault

### getCallback

    public NodeCallback getCallback()

  **Experimental** Get the callback that may be called by XPath as nodes are located.
  Returns:
    the current callback method.
  Overrides:
    getCallback in class XPathSupportDefault

### getCallbackInfo

    public java.lang.Object getCallbackInfo()

  Get the object that will be passed to the processLocatedNode method.
  Returns:
    object that will be passed to the processLocatedNode method.
  Overrides:
    getCallbackInfo in class XPathSupportDefault

### getDocument

    public org.w3c.dom.Document getDocument()

  Returns the document just parsed.
  Specified by:
    getDocument in interface XMLParserLiaison

### checkNode

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

  Check node to see if it matches this liaison.
  Specified by:
    checkNode in interface XMLParserLiaison

### copyFromOtherLiaison

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

  Copy attributes from another liaison.
  Specified by:
    copyFromOtherLiaison in interface XMLParserLiaison

### setLocale

    public void setLocale(java.util.Locale locale)
                   throws org.xml.sax.SAXException

  Allow an application to request a locale for errors and warnings.

  SAX parsers are not required to provide localisation for errors and warnings; if they cannot support the requested locale, however, they must throw a SAX exception. Applications may not request a locale change in the middle of a parse.

  Parameters:
    `locale` - A Java Locale object.
  Throws:
    org.xml.sax.SAXException - Throws an exception (using the previous or default locale) if the requested locale is not supported.
  See Also:
    `SAXException`, `SAXParseException`

### setEntityResolver

    public void setEntityResolver(org.xml.sax.EntityResolver resolver)

  Allow an application to register a custom entity resolver.

  If the application does not register an entity resolver, the SAX parser will resolve system identifiers and open connections to entities itself (this is the default behaviour implemented in HandlerBase).

  Applications may register a new or different entity resolver in the middle of a parse, and the SAX parser must begin using the new resolver immediately.

  Parameters:
    `resolver` - The object for resolving entities.
  See Also:
    `EntityResolver`, `HandlerBase`

### setDTDHandler

    public void setDTDHandler(org.xml.sax.DTDHandler handler)

  Allow an application to register a DTD event handler.

  If the application does not register a DTD handler, all DTD events reported by the SAX parser will be silently ignored (this is the default behaviour implemented by HandlerBase).

  Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

  Parameters:
    `handler` - The DTD handler.
  See Also:
    `DTDHandler`, `HandlerBase`

### setDocumentHandler

    public void setDocumentHandler(org.xml.sax.DocumentHandler handler)

  Allow an application to register a document event handler.

  If the application does not register a document handler, all document events reported by the SAX parser will be silently ignored (this is the default behaviour implemented by HandlerBase).

  Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

  Parameters:
    `handler` - The document handler.
  See Also:
    `DocumentHandler`, `HandlerBase`

### setErrorHandler

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

  Allow an application to register an error event handler.

  If the application does not register an error event handler, all error events reported by the SAX parser will be silently ignored, except for fatalError, which will throw a SAXException (this is the default behaviour implemented by HandlerBase).

  Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

  Specified by:
    setErrorHandler in interface XMLParserLiaison
  Parameters:
    `handler` - The error handler.
  See Also:
    `ErrorHandler`, `SAXException`, `HandlerBase`

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

  This method needs to be overridden by a derived class.

  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.
  See Also:
    `InputSource`, `parse(java.lang.String)`, `setEntityResolver(org.xml.sax.EntityResolver)`, `setDTDHandler(org.xml.sax.DTDHandler)`, `setDocumentHandler(org.xml.sax.DocumentHandler)`, `setErrorHandler(org.xml.sax.ErrorHandler)`

### parse

    public void parse(java.lang.String systemId)
               throws org.xml.sax.SAXException,
                      java.io.IOException

  Parse an XML document from a system identifier (URI).

  This method is a shortcut for the common case of reading a document from a system identifier. It is the exact equivalent of the following:

       parse(new InputSource(systemId));

  If the system identifier is a URL, it must be fully resolved by the application before it is passed to the parser.

  Parameters:
    `systemId` - The system identifier (URI).
  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.
  See Also:
    `parse(org.xml.sax.InputSource)`

### supportsSAX

    public boolean supportsSAX()

  Returns true if the liaison supports the SAX DocumentHandler interface. The default is that the parser does not support the SAX interface.
  Specified by:
    supportsSAX in interface XMLParserLiaison

### getDefaultXPathFactory

    public XPathFactory getDefaultXPathFactory()

  Get a factory to create XPaths.
  Specified by:
    getDefaultXPathFactory in interface XMLParserLiaison

### setProcessNamespaces

    public void setProcessNamespaces(boolean processNamespaces)

  Deprecated.
  Set whether or not the liaison attempts to expand namespaces. Used for optimization. No longer supported.
  Overrides:
    setProcessNamespaces in class XPathSupportDefault

### getProcessNamespaces

    public boolean getProcessNamespaces()

  Deprecated.
  Tells if namespaces should be supported. For optimization purposes.
  Overrides:
    getProcessNamespaces in class XPathSupportDefault

### shouldStripSourceNode

    public boolean shouldStripSourceNode(org.w3c.dom.Node textNode)
                                  throws org.xml.sax.SAXException

  **For advanced use only** Tells, through the combination of the default-space attribute on xsl:stylesheet, xsl:strip-space, xsl:preserve-space, and the xml:space attribute, whether or not extra whitespace should be stripped from the node. Literal elements from template elements should not be tested with this function.
  Parameters:
    `textNode` - A text node from the source tree.
  Returns:
    true if the text node should be stripped of extra whitespace.
  Overrides:
    shouldStripSourceNode in class XPathSupportDefault

### getParserDescription

    public java.lang.String getParserDescription()

  Return a string suitible for telling the user what parser is being used.
  Specified by:
    getParserDescription in interface XMLParserLiaison

### getIndent

    public int getIndent()

  Get the amount to indent when indent-result="yes".
  Specified by:
    getIndent in interface XMLParserLiaison

### setIndent

    public void setIndent(int i)

  Set the amount to indent when indent-result="yes".
  Specified by:
    setIndent in interface XMLParserLiaison

### setAcceptLanguage

    public void setAcceptLanguage(java.lang.String acceptLanguage)

  Set language variant that should be used, passed from servlet HTTP header.
  Specified by:
    setAcceptLanguage in interface XMLParserLiaison

### getAcceptLanguage

    public java.lang.String getAcceptLanguage()

  Get language variant that should be used, passed from servlet HTTP header.
  Specified by:
    getAcceptLanguage in interface XMLParserLiaison

### getShouldExpandEntityRefs

    public boolean getShouldExpandEntityRefs()

  get whether or not to expand all entity references in the source and style trees.
  Specified by:
    getShouldExpandEntityRefs in interface XMLParserLiaison

### setShouldExpandEntityRefs

    public void setShouldExpandEntityRefs(boolean b)

  Set whether or not to expand all entity references in the source and style trees. Not supported in DTM. Entities are expanded by default.
  Specified by:
    setShouldExpandEntityRefs in interface XMLParserLiaison

### getUseValidation

    public boolean getUseValidation()

  If set to true, validation will be performed, if set to false, validation will not be performed. Validation is dynamic by default. Note that if validation is off, the id() function will not be able to locate nodes.
  Specified by:
    getUseValidation in interface XMLParserLiaison

### setUseValidation

    public void setUseValidation(boolean b)

  If set to true, validation will be performed, if set to false, validation will not be performed. Validation is dynamic by default. Note that if validation is off, the id() function will not be able to locate nodes.
  Specified by:
    setUseValidation in interface XMLParserLiaison

### setSpecialCharacters

    public void setSpecialCharacters(java.lang.String str)

  Deprecated.
  Set special characters for attributes that will be escaped.
  Specified by:
    setSpecialCharacters in interface XMLParserLiaison

### getSpecialCharacters

    public java.lang.String getSpecialCharacters()

  Deprecated.
  Get special characters for attributes that will be escaped.
  Specified by:
    getSpecialCharacters in interface XMLParserLiaison

### 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.
  Specified by:
    setEnvSupport in interface XMLParserLiaison

### 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 XMLParserLiaison
  Throws:
    XSLProcessorException - thrown if the active ProblemListener and XMLParserLiaison decide the error condition is severe enough to halt processing.
  Overrides:
    getURLFromString in class XPathSupportDefault

### createDocument

    public org.w3c.dom.Document createDocument()

  Create an empty DOM Document. Mainly used for creating an output document. Implementation of XMLParserLiaison interface method. Default handling: Not supported - need parser-specific implementation.
  Specified by:
    createDocument in interface XMLParserLiaison

### getNamespaceForPrefix

    public java.lang.String getNamespaceForPrefix(java.lang.String prefix,
                                                  org.w3c.dom.Element namespaceContext)

  Given a prefix and a namespace context, return the expanded namespace. Default handling:
  Overrides:
    getNamespaceForPrefix in class XPathSupportDefault

### getNamespaceOfNode

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

  Returns the namespace of the given node.
  Overrides:
    getNamespaceOfNode in class XPathSupportDefault

### getLocalNameOfNode

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

  Returns the local name of the given node.
  Overrides:
    getLocalNameOfNode in class XPathSupportDefault

### getExpandedElementName

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

  Returns the element name with the namespace expanded.
  Specified by:
    getExpandedElementName in interface XMLParserLiaison

### getExpandedAttributeName

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

  Returns the attribute name with the namespace expanded.
  Specified by:
    getExpandedAttributeName in interface XMLParserLiaison

### isIgnorableWhitespace

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

  Deprecated.
  Tell if the node is ignorable whitespace.
  Overrides:
    isIgnorableWhitespace in class XPathSupportDefault

### getParentOfNode

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

  I have to write this silly, and expensive function, because the DOM WG decided that attributes don't have parents. If Xalan is used with a DOM implementation that reuses attribute nodes, this will not work correctly.
  Overrides:
    getParentOfNode in class XPathSupportDefault

### getElementByID

    public org.w3c.dom.Element getElementByID(java.lang.String id,
                                              org.w3c.dom.Document doc)

  Given an ID, return the element.
  Overrides:
    getElementByID in class XPathSupportDefault

### getUnparsedEntityURI

    public java.lang.String getUnparsedEntityURI(java.lang.String name,
                                                 org.w3c.dom.Document doc)

  The getUnparsedEntityURI function returns the URI of the unparsed entity with the specified name in the same document as the context node (see [3.3 Unparsed Entities]). It returns the empty string if there is no such entity. (Should this go here or in the XLocator??) Since it states in the DOM draft: "An XML processor may choose to completely expand entities before the structure model is passed to the DOM; in this case, there will be no EntityReferences in the DOM tree." So I'm not sure how well this is going to work.
  Overrides:
    getUnparsedEntityURI in class XPathSupportDefault

### getRoot

    public org.w3c.dom.Node getRoot(org.w3c.dom.Node node)

  Get the first unparented node in the ancestor chain.
  Overrides:
    getRoot in class XPathSupportDefault

### setDOMFactory

    public void setDOMFactory(org.w3c.dom.Document domFactory)

  Get the factory object required to create DOM nodes in the result tree.
  Overrides:
    setDOMFactory in class XPathSupportDefault

### getDOMFactory

    public org.w3c.dom.Document getDOMFactory()

  Get the factory object required to create DOM nodes in the result tree.
  Overrides:
    getDOMFactory in class XPathSupportDefault

### getNodeData

    public static java.lang.String getNodeData(org.w3c.dom.Node node)

  Get the textual contents of the node. If the node is an element, apply whitespace stripping rules, though I'm not sure if this is right (I'll fix or declare victory when I review the entire whitespace handling).

### getNodeData

    public static void getNodeData(org.w3c.dom.Node node,
                                   java.lang.StringBuffer buf)

  Get the textual contents of the node. If the node is an element, apply whitespace stripping rules, though I'm not sure if this is right (I'll fix or declare victory when I review the entire whitespace handling).

### toMarkup

    public void toMarkup(org.w3c.dom.Document doc,
                         java.io.Writer writer,
                         java.lang.String method,
                         java.lang.String version,
                         boolean doIndent,
                         int indent,
                         java.lang.String encoding,
                         java.lang.String mediaType,
                         java.lang.String doctypeSystem,
                         java.lang.String doctypePublic,
                         boolean omitXMLDeclaration,
                         boolean standalone,
                         java.lang.String[] cdataSectionElems)
                  throws java.lang.Exception

  Deprecated.
  Print a DOM tree.

### toMarkup

    public void toMarkup(org.w3c.dom.Document doc,
                         java.io.OutputStream ostream,
                         java.lang.String method,
                         java.lang.String version,
                         boolean doIndent,
                         int indent,
                         java.lang.String encoding,
                         java.lang.String mediaType,
                         java.lang.String doctypeSystem,
                         java.lang.String doctypePublic,
                         boolean omitXMLDeclaration,
                         boolean standalone,
                         java.lang.String[] cdataSectionElems)
                  throws java.lang.Exception

  Deprecated.
  Print a DOM tree.

### problem

    public boolean problem(short where,
                           short classification,
                           org.w3c.dom.Node styleNode,
                           org.w3c.dom.Node sourceNode,
                           java.lang.String msg,
                           int lineNo,
                           int charOffset)

  Function that is called when a problem event occurs.
  Parameters:
    `where` - Either and XMLPARSER, XSLPROCESSOR, or QUERYENGINE.
    `classification` - Either ERROR or WARNING.
    `styleNode` - The style tree node where the problem occurred. May be null.
    `sourceNode` - The source tree node where the problem occurred. May be null.
    `msg` - A string message explaining the problem.
    `lineNo` - The line number where the problem occurred, if it is known. May be zero.
    `charOffset` - The character offset where the problem, occurred if it is known. May be zero.
  Returns:
    true if the return is an ERROR, in which case exception will be thrown. Otherwise the processor will continue to process.
  Overrides:
    problem in class XPathSupportDefault

### warning

    public void warning(int msg)

  Warn the user of an problem.

### warn

    public void warn(int msg)

  Warn the user of an problem.

### warn

    public void warn(org.w3c.dom.Node sourceNode,
                     int msg)

  Warn the user of an problem.

### warn

    public void warn(org.w3c.dom.Node sourceNode,
                     int msg,
                     java.lang.Object[] args)

  Warn the user of an problem.

### error

    public void error(int msg)
               throws org.xml.sax.SAXException

  Tell the user of an error, and probably throw an exception.

### error

    public void error(org.w3c.dom.Node sourceNode,
                      int msg)
               throws org.xml.sax.SAXException

  Tell the user of an error, and probably throw an exception.

### error

    public void error(org.w3c.dom.Node sourceNode,
                      int msg,
                      java.lang.Object[] args)
               throws org.xml.sax.SAXException

  Tell the user of an error, and probably throw an exception.

### getNodeSetByKey

    public org.w3c.dom.NodeList getNodeSetByKey(org.w3c.dom.Node doc,
                                                java.lang.String name,
                                                java.lang.String ref,
                                                PrefixResolver nscontext)
                                         throws org.xml.sax.SAXException

  Given a valid element key, return the corresponding node list.
  Overrides:
    getNodeSetByKey in class XPathSupportDefault

### getVariable

    public XObject getVariable(QName name)
                        throws org.xml.sax.SAXException

  Given a name, locate a variable in the current context, and return the Object.
  Overrides:
    getVariable in class XPathSupportDefault

### addExtensionNamespace

    public void addExtensionNamespace(java.lang.String uri,
                                      ExtensionFunctionHandler extNS)

  **For advanced use only** Register an extension namespace handler. This handler provides functions for testing whether a function is known within the namespace and also for invoking the functions.
  Parameters:
    `uri` - the URI for the extension.
    `extNS` - the extension handler.
  Overrides:
    addExtensionNamespace in class XPathSupportDefault

### addExtensionElementNamespace

    public void addExtensionElementNamespace(java.lang.String uri,
                                             ExtensionFunctionHandler extNS)

  **For advanced use only** Register an element extension namespace handler. This handler provides functions for testing whether a function is known within the namespace and also for invoking the functions.
  Parameters:
    `uri` - the URI for the extension.
    `extNS` - the extension handler.

### functionAvailable

    public boolean functionAvailable(java.lang.String ns,
                                     java.lang.String funcName)

  Execute the function-available() function.
  Parameters:
    `ns` - the URI of namespace in which the function is needed
    `funcName` - the function name being tested
  Returns:
    whether the given function is available or not.
  Overrides:
    functionAvailable in class XPathSupportDefault

### elementAvailable

    public boolean elementAvailable(java.lang.String ns,
                                    java.lang.String funcName)

  Execute the element-available() function.
  Parameters:
    `ns` - the URI of namespace in which the function is needed
    `funcName` - the function name being tested
  Returns:
    whether the given function is available or not.
  Overrides:
    elementAvailable in class XPathSupportDefault

### extFunction

    public java.lang.Object extFunction(java.lang.String ns,
                                        java.lang.String funcName,
                                        java.util.Vector argVec,
                                        java.lang.Object methodKey)
                                 throws org.xml.sax.SAXException

  Handle an extension function.
  Parameters:
    `ns` - the URI of namespace in which the function is needed
    `funcName` - the function name being called
    `argVec` - arguments to the function in a vector
  Returns:
    result of executing the function
  Overrides:
    extFunction in class XPathSupportDefault

### getSourceDocsTable

    public java.util.Hashtable getSourceDocsTable()

  Overrides:
    getSourceDocsTable in class XPathSupportDefault

### findURIFromDoc

    public java.lang.String findURIFromDoc(org.w3c.dom.Document owner)

  Given a document, find the URL associated with that document.
  Parameters:
    `owner` - Document that was previously processed by this liaison.
  Overrides:
    findURIFromDoc in class XPathSupportDefault

### associateXLocatorToNode

    public void associateXLocatorToNode(org.w3c.dom.Node node,
                                        XLocator xlocator)

  **For advanced use only** Associate an XLocator provider to a node. This makes the association based on the root of the tree that the node is parented by.
  Overrides:
    associateXLocatorToNode in class XPathSupportDefault

### deassociateXLocatorToNode

    public void deassociateXLocatorToNode(org.w3c.dom.Node node)

  **For advanced use only** Associate an XLocator provider to a node. This makes the association based on the root of the tree that the node is parented by.
  Overrides:
    deassociateXLocatorToNode in class XPathSupportDefault

### createXLocatorHandler

    public XLocator createXLocatorHandler()

  **For advanced use only** getXLocatorHandler.
  Overrides:
    createXLocatorHandler in class XPathSupportDefault

### getXLocatorFromNode

    public XLocator getXLocatorFromNode(org.w3c.dom.Node node)

  **For advanced use only** Get an XLocator provider keyed by node. This get's the association based on the root of the tree that the node is parented by.
  Overrides:
    getXLocatorFromNode in class XPathSupportDefault

### getThrowFoundIndex

    public boolean getThrowFoundIndex()

  **For internal use only** ThrowFoundIndex tells if FoundIndex should be thrown if index is found. This is an optimization for match patterns, and is used internally by the XPath engine.
  Overrides:
    getThrowFoundIndex in class XPathSupportDefault

### setThrowFoundIndex

    public void setThrowFoundIndex(boolean b)

  **For internal use only** ThrowFoundIndex tells if FoundIndex should be thrown if index is found. This is an optimization for match patterns, and is used internally by the XPath engine.
  Overrides:
    setThrowFoundIndex in class XPathSupportDefault

### getErrorHandler

    public org.xml.sax.ErrorHandler getErrorHandler()

  Get the current error handler, if there is one.
  Overrides:
    getErrorHandler in class XPathSupportDefault

### setUseDOM2getNamespaceURI

    public void setUseDOM2getNamespaceURI(boolean v)

  Specified by:
    setUseDOM2getNamespaceURI in interface XMLParserLiaison

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.