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
Interface XPathSupport

All Known Subinterfaces:
  XMLParserLiaison

All Known Implementing Classes:
  XPathSupportDefault, XercesLiaison

public interface XPathSupport
extends XPathEnvSupport

Provides basic support for independent use of XPath. This interface is used in order that there may be loose coupling between the XPath package and the support services, such as the variable store, parser services, DOM implementation, etc. Most if all implementations of this should derive from XPathSupportDefault (hence, it should probably be an abstract class instead of an interface).

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.

Field Summary
`static short` | `DATASOURCE`
`static short` | `ERROR`
`static short` | `WARNING`
`static short` | `XMLPARSER`
`static short` | `XPATHPARSER`
`static short` | `XPATHPROCESSOR`
`static short` | `XSLTPROCESSOR`

Method Summary
`void` | `addExtensionNamespace(java.lang.String uri, ExtensionFunctionHandler extNS)` Register an extension namespace handler.
`void` | `beginConstruction(KeyDeclaration kd)`
`XLocator` | `createXLocatorHandler()` getXLocatorHandler.
`void` | `decrementContextNodePosition()` Decrement the current context node position.
`void` | `endConstruction(KeyDeclaration kd)`
`org.w3c.dom.NodeList` | `getContextNodeList()` Get the current context node list.
`int` | `getContextNodePosition()` Get the current position in the context node list.
`org.w3c.dom.Node` | `getCurrentNode()` Get the current context node.
`org.w3c.dom.Element` | `getElementByID(java.lang.String id, org.w3c.dom.Document doc)` Get an element from an ID.
`org.xml.sax.ErrorHandler` | `getErrorHandler()` Get the current error handler, if there is one.
`boolean` | `getInConstruction(KeyDeclaration kd)`
`java.lang.String` | `getLocalNameOfNode(org.w3c.dom.Node n)` Returns the local name of the given node.
`PrefixResolver` | `getNamespaceContext()` Get the current namespace context for the xpath.
`java.lang.String` | `getNamespaceForPrefix(java.lang.String prefix, org.w3c.dom.Element namespaceContext)` Given a namespace, get the corresponding prefix.
`java.lang.String` | `getNamespaceOfNode(org.w3c.dom.Node n)` Returns the namespace of the given node.
`int` | `getNodeNumber(org.w3c.dom.Node n)`
`org.w3c.dom.Node` | `getParentOfNode(org.w3c.dom.Node node)` This function has to be implemented, because the DOM WG decided that attributes don't have parents.
`boolean` | `getProcessNamespaces()` Deprecated.
`boolean` | `getThrowFoundIndex()` 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.
`void` | `incrementContextNodePosition(org.w3c.dom.Node node)` Increment the current context node position.
`boolean` | `isIgnorableWhitespace(org.w3c.dom.Text node)` Deprecated.
`org.w3c.dom.Document` | `parseXML(java.net.URL url, org.xml.sax.DocumentHandler docHandler, org.w3c.dom.Document styleDoc)` Deprecated.
`void` | `popContextNodeList()` Pop the current context node list.
`void` | `popContextNodePosition()` Pop the current context node position.
`void` | `popXPathContext()` Pop the current XPathContext.
`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` | `pushContextNodeList(org.w3c.dom.NodeList nl)` Set the current context node list.
`void` | `pushContextNodePosition()` Push the current context node position.
`void` | `pushDummyXPathContext()` Push a dummy XPathContext so we can tell that the top-level xpath isn't in effect.
`void` | `pushXPathContext(XPath xpath, XPathSupport execContext, org.w3c.dom.Node contextNode, PrefixResolver namespaceContext)` Push the current XPath selection, needed for support of the last() function in depth-first execution.
`XObject` | `reExecuteXPathContext(XPath path, XPathSupport execContext, org.w3c.dom.Node context)` Reexecute the last xpath context after the specified one.
`void` | `setContextNodePosition(int newNodePos)` Set the current context node position.
`void` | `setCurrentNode(org.w3c.dom.Node n)` Set the current context node.
`void` | `setNamespaceContext(PrefixResolver pr)` Get the current namespace context for the xpath.
`void` | `setProcessNamespaces(boolean processNamespaces)` Deprecated.
`void` | `setThrowFoundIndex(boolean b)` ThrowFoundIndex tells if FoundIndex should be thrown if index is found.
`boolean` | `supportsNodeNumber(org.w3c.dom.Node n)`

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

Field Detail

### WARNING

    public static final short WARNING

### ERROR

    public static final short ERROR

### XMLPARSER

    public static final short XMLPARSER

### XSLTPROCESSOR

    public static final short XSLTPROCESSOR

### XPATHPARSER

    public static final short XPATHPARSER

### XPATHPROCESSOR

    public static final short XPATHPROCESSOR

### DATASOURCE

    public static final short DATASOURCE

Method Detail

### getContextNodeList

    public org.w3c.dom.NodeList getContextNodeList()

  Get the current context node list.

### pushContextNodeList

    public void pushContextNodeList(org.w3c.dom.NodeList nl)

  Set the current context node list.

  Parameters:
    `A` - nodelist that represents the current context list as defined by XPath.

### popContextNodeList

    public void popContextNodeList()

  Pop the current context node list.

### getContextNodePosition

    public int getContextNodePosition()

  Get the current position in the context node list. Used for depth-first searching.

### incrementContextNodePosition

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

  Increment the current context node position.

### setContextNodePosition

    public void setContextNodePosition(int newNodePos)

  Set the current context node position.

### decrementContextNodePosition

    public void decrementContextNodePosition()

  Decrement the current context node position.

### pushContextNodePosition

    public void pushContextNodePosition()

  Push the current context node position.

### popContextNodePosition

    public void popContextNodePosition()

  Pop the current context node position.

### getCurrentNode

    public org.w3c.dom.Node getCurrentNode()

  Get the current context node.

  Returns:
    The current context node as defined by the XPath recommendation.

### setCurrentNode

    public void setCurrentNode(org.w3c.dom.Node n)

  Set the current context node.

  Parameters:
    `n` - The current context node as defined by the XPath recommendation.

### pushXPathContext

    public void pushXPathContext(XPath xpath,
                                 XPathSupport execContext,
                                 org.w3c.dom.Node contextNode,
                                 PrefixResolver namespaceContext)

  Push the current XPath selection, needed for support of the last() function in depth-first execution. If the last() function is called, the originating XPath will be executed to get a count. This is ugly, and later some sort of system can be done where the XPath can finish evaluating from the current point.

### popXPathContext

    public void popXPathContext()

  Pop the current XPathContext.

### reExecuteXPathContext

    public XObject reExecuteXPathContext(XPath path,
                                         XPathSupport execContext,
                                         org.w3c.dom.Node context)
                                  throws org.xml.sax.SAXException

  Reexecute the last xpath context after the specified one.

### pushDummyXPathContext

    public void pushDummyXPathContext()

  Push a dummy XPathContext so we can tell that the top-level xpath isn't in effect.

### getNamespaceContext

    public PrefixResolver getNamespaceContext()

  Get the current namespace context for the xpath.

  Returns:
    An object that can resolve XPath prefixes to namespaces.

### setNamespaceContext

    public void setNamespaceContext(PrefixResolver pr)

  Get the current namespace context for the xpath.

  Parameters:
    `pr` - An object that can resolve XPath prefixes to namespaces.

### getNamespaceForPrefix

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

  Given a namespace, get the corresponding prefix.

  Parameters:
    `prefix` - A namespace prefix that is valid in the namespaceContext.
    `namespaceContext` - An element from which to evaluate the prefix resolution.
  Returns:
    A namespace, or null if it can't be resolved.

### getNamespaceOfNode

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

  Returns the namespace of the given node.

  Parameters:
    `n` - The node in question.
  Returns:
    A namespace, or null if there is none.

### getLocalNameOfNode

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

  Returns the local name of the given node.

  Parameters:
    `n` - The node in question.
  Returns:
    The local name of the node, or null if the node doesn't have a name.

### getParentOfNode

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

  This function has to be implemented, because the DOM WG decided that attributes don't have parents.

  Parameters:
    `n` - The node in question.
  Returns:
    The "owner" of the node.

### isIgnorableWhitespace

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

  Deprecated.
  Tell if the node is ignorable whitespace. This should be in the DOM. Return false if the parser doesn't handle this.

### parseXML

    public org.w3c.dom.Document parseXML(java.net.URL url,
                                         org.xml.sax.DocumentHandler docHandler,
                                         org.w3c.dom.Document styleDoc)
                                  throws org.xml.sax.SAXException

  Deprecated.
  Take given a URL, try and parse XML. the error condition is severe enough to halt processing.

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

  Throws:
    XSLProcessorException - thrown if the active ProblemListener and XMLParserLiaison decide the error condition is severe enough to halt processing.

### getElementByID

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

  Get an element from an ID.

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

### setProcessNamespaces

    public void setProcessNamespaces(boolean processNamespaces)

  Deprecated.
  Set whether or not the liaison attempts to expand namespaces. Used for optimization. No longer used.

### getProcessNamespaces

    public boolean getProcessNamespaces()

  Deprecated.
  Tells if namespaces should be supported. For optimization purposes.

### addExtensionNamespace

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

  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.

### getThrowFoundIndex

    public boolean getThrowFoundIndex()

  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.

### setThrowFoundIndex

    public void setThrowFoundIndex(boolean b)

  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.

### getErrorHandler

    public org.xml.sax.ErrorHandler getErrorHandler()

  Get the current error handler, if there is one.

### createXLocatorHandler

    public XLocator createXLocatorHandler()

  getXLocatorHandler.

### getInConstruction

    public boolean getInConstruction(KeyDeclaration kd)

### beginConstruction

    public void beginConstruction(KeyDeclaration kd)

### endConstruction

    public void endConstruction(KeyDeclaration kd)

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

### supportsNodeNumber

    public boolean supportsNodeNumber(org.w3c.dom.Node n)

### getNodeNumber

    public int getNodeNumber(org.w3c.dom.Node n)

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