BEA Systems, Inc.

WebLogic Server 6.0sp2 API Reference

weblogic.apache.xalan.xpath
Interface XLocator

All Known Implementing Classes:
SimpleNodeLocator

public interface XLocator
extends java.io.Serializable

This interface provides services for processing a XPath LocationPath. Either the default implementation (SimpleNodeLocator) will be used to implement this interface, or an extension function that serves as a factory method can be used that returns an XLocator.

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.

Method Summary
 XNodeSet connectToNodes(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, java.util.Vector connectArgs)
          Execute a connection (if it was not executed by the static connect method) and process the following LocationPath, if it is present.
 XNodeSet locationPath(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, NodeCallback callback, java.lang.Object callbackInfo, boolean stopAtFirst)
          Execute a location path.
 double locationPathPattern(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos)
          Execute a location path pattern.
 XNodeSet union(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, NodeCallback callback, java.lang.Object callbackInfo)
          Execute a union.
 

Method Detail

connectToNodes

public XNodeSet connectToNodes(XPath xpath,
                               XPathSupport execContext,
                               org.w3c.dom.Node context,
                               int opPos,
                               java.util.Vector connectArgs)
                        throws org.xml.sax.SAXException
Execute a connection (if it was not executed by the static connect method) and process the following LocationPath, if it is present. Normally, the connection functionality should be executed by this function and not the static connect function, which is really a factory method for the XLocator instance. The arguments to the static connect function are re-passed to this function.

Parameters:
xpath - The xpath that is executing.
context - The current source tree context node.
opPos - The current position in the xpath.m_opMap array.
connectArgs - The same arguments that were passed to the static connect function.

union

public XNodeSet union(XPath xpath,
                      XPathSupport execContext,
                      org.w3c.dom.Node context,
                      int opPos,
                      NodeCallback callback,
                      java.lang.Object callbackInfo)
               throws org.xml.sax.SAXException
Execute a union. The union of its operands, which are locationPaths, must be node-sets.

Parameters:
xpath - The xpath that is executing.
execContext - The execution context.
context - The current source tree context node.
opPos - The current position in the xpath.m_opMap array.
callback - Interface that implements the processLocatedNode method.
callbackInfo - Object that will be passed to the processLocatedNode method.

locationPath

public XNodeSet locationPath(XPath xpath,
                             XPathSupport execContext,
                             org.w3c.dom.Node context,
                             int opPos,
                             NodeCallback callback,
                             java.lang.Object callbackInfo,
                             boolean stopAtFirst)
                      throws org.xml.sax.SAXException
Execute a location path. Normally, this method simply moves past the OP_LOCATIONPATH and it's length member, and calls the Step function, which will recursivly process the rest of the LocationPath, and then wraps the NodeList result in an XNodeSet object.

Parameters:
xpath - The xpath that is executing.
context - The current source tree context node.
opPos - The current position in the xpath.m_opMap array.
callback - Interface that implements the processLocatedNode method.
callbackInfo - Object that will be passed to the processLocatedNode method.
stopAtFirst - True if only the first found node in doc order is needed.

locationPathPattern

public double locationPathPattern(XPath xpath,
                                  XPathSupport execContext,
                                  org.w3c.dom.Node context,
                                  int opPos)
                           throws org.xml.sax.SAXException
Execute a location path pattern. This will return a score of MATCH_SCORE_NONE, MATCH_SCORE_NODETEST, MATCH_SCORE_OTHER, MATCH_SCORE_QNAME.

Parameters:
xpath - The xpath that is executing.
context - The current source tree context node.
opPos - The current position in the xpath.m_opMap array.

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs60