org.apache.xalan.xpath
Class XPathProcessorImpl

java.lang.Object
  |
  +--org.apache.xalan.xpath.XPathProcessorImpl

public class XPathProcessorImpl
extends java.lang.Object
implements XPathProcessor, java.io.Serializable

Tokenizes and parses XPath expressions. This should really be named XPathParserImpl, and may be renamed in the future.

See Also:
Serialized Form

Constructor Summary
XPathProcessorImpl()
          The parser constructor.
XPathProcessorImpl(XPathSupport callbacks)
          The parser constructor.
 
Method Summary
static void diagnoseXPathString(java.lang.String str)
          Dump an XPath string to System.out.
static void diagnoseXPathString2(java.lang.String str)
          Dump an XPath string to System.out.
static void diagnoseXPathString3(java.lang.String str)
          Dump an XPath string to System.out.
 void initMatchPattern(XPath pathObj, java.lang.String expression, PrefixResolver namespaceContext)
          Given an string, init an XPath object for pattern matches, in order that a parse doesn't have to be done each time the expression is evaluated.
 void initXPath(XPath pathObj, java.lang.String expression, PrefixResolver namespaceContext)
          Given an string, init an XPath object for selections, in order that a parse doesn't have to be done each time the expression is evaluated.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPathProcessorImpl

public XPathProcessorImpl(XPathSupport callbacks)
The parser constructor.
Parameters:
callbacks - The execution context.

XPathProcessorImpl

public XPathProcessorImpl()
The parser constructor. This constructor creates it's own XPathSupportDefault object, which is only useful for some limited cases.
Method Detail

initXPath

public void initXPath(XPath pathObj,
                      java.lang.String expression,
                      PrefixResolver namespaceContext)
               throws org.xml.sax.SAXException
Given an string, init an XPath object for selections, in order that a parse doesn't have to be done each time the expression is evaluated.
Specified by:
initXPath in interface XPathProcessor
Parameters:
pathObj - The XPath object to be initialized.
expresson - A String representing the XPath.
namespaceContext - An object that is able to resolve prefixes in the XPath to namespaces.

initMatchPattern

public void initMatchPattern(XPath pathObj,
                             java.lang.String expression,
                             PrefixResolver namespaceContext)
                      throws org.xml.sax.SAXException
Given an string, init an XPath object for pattern matches, in order that a parse doesn't have to be done each time the expression is evaluated.
Specified by:
initMatchPattern in interface XPathProcessor
Parameters:
pathObj - The XPath object to be initialized.
expresson - A String representing the XPath.
namespaceContext - An object that is able to resolve prefixes in the XPath to namespaces.

diagnoseXPathString

public static void diagnoseXPathString(java.lang.String str)
                                throws org.xml.sax.SAXException
Dump an XPath string to System.out.

diagnoseXPathString2

public static void diagnoseXPathString2(java.lang.String str)
                                 throws org.xml.sax.SAXException
Dump an XPath string to System.out.

diagnoseXPathString3

public static void diagnoseXPathString3(java.lang.String str)
                                 throws org.xml.sax.SAXException
Dump an XPath string to System.out.