jd.xml.xpath.parser
Class XPathParseContext

java.lang.Object
  extended byjd.xml.xpath.parser.XPathParseContext
Direct Known Subclasses:
XsltParseContext

public class XPathParseContext
extends Object

XPathParseContext provides context information for the parser.


Constructor Summary
XPathParseContext()
          Create a XPathParseContext.
XPathParseContext(FunctionLibrary functionLibrary)
          Create a XPathParseContext.
 
Method Summary
 FunctionLibrary getFunctionLibrary()
          Return the function library.
 String getNamespaceUri(String prefix)
          Return the namespace uri for the prefix.
 NodeNamePool getNodeNamePool()
          Return a NodeNamePool which is used to build optimized NodeNameTests.
 VariableName getVariableName(String qname)
          Create a variables name from its qname.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPathParseContext

public XPathParseContext()
Create a XPathParseContext.


XPathParseContext

public XPathParseContext(FunctionLibrary functionLibrary)
Create a XPathParseContext.

Method Detail

getNamespaceUri

public String getNamespaceUri(String prefix)
Return the namespace uri for the prefix. The default implementation only recognizes the prefix "xml" of the xml namespace.


getFunctionLibrary

public final FunctionLibrary getFunctionLibrary()
Return the function library.


getNodeNamePool

public NodeNamePool getNodeNamePool()
Return a NodeNamePool which is used to build optimized NodeNameTests. The default implementation returns null.


getVariableName

public VariableName getVariableName(String qname)
                             throws Exception
Create a variables name from its qname. Since xpath does not define how variables are set or how their names are bound to values this method can be overwritten by derived parser implementations to create a name suitable for the lookup of a variables value. The default implementation simply returns the name.

Returns:
the name
Throws:
Exception - thrown if the name could not be created