Package org.apache.xpath
Class XPathContext.XPathExpressionContext
java.lang.Object
org.apache.xpath.XPathContext.XPathExpressionContext
- All Implemented Interfaces:
ExpressionContext
- Enclosing class:
- XPathContext
public class XPathContext.XPathExpressionContext extends Object implements ExpressionContext
-
Constructor Summary
Constructors Constructor Description XPathExpressionContext() -
Method Summary
Modifier and Type Method Description NodegetContextNode()Get the current context node.NodeIteratorgetContextNodes()Get the current context node list.DTMManagergetDTMManager()Return the DTMManager object.ErrorListenergetErrorListener()Get the error listener.XObjectgetVariableOrParam(QName qname)Get a variable based on it's qualified name.XPathContextgetXPathContext()Return the XPathContext associated with this XPathExpressionContext.doubletoNumber(Node n)Get the value of a node as a number.StringtoString(Node n)Get the value of a node as a string.
-
Constructor Details
-
XPathExpressionContext
public XPathExpressionContext()
-
-
Method Details
-
getXPathContext
Return the XPathContext associated with this XPathExpressionContext. Extensions should use this judiciously and only when special processing requirements cannot be met another way. Consider requesting an enhancement to the ExpressionContext interface to avoid having to call this method.- Specified by:
getXPathContextin interfaceExpressionContext- Returns:
- the XPathContext associated with this XPathExpressionContext.
-
getDTMManager
Return the DTMManager object. Though XPathContext context extends the DTMManager, it really is a proxy for the real DTMManager. If a caller needs to make a lot of calls to the DTMManager, it is faster if it gets the real one from this function. -
getContextNode
Get the current context node.- Specified by:
getContextNodein interfaceExpressionContext- Returns:
- The current context node.
-
getContextNodes
Get the current context node list.- Specified by:
getContextNodesin interfaceExpressionContext- Returns:
- An iterator for the current context list, as defined in XSLT.
-
getErrorListener
Get the error listener.- Specified by:
getErrorListenerin interfaceExpressionContext- Returns:
- The registered error listener.
-
toNumber
Get the value of a node as a number.- Specified by:
toNumberin interfaceExpressionContext- Parameters:
n- Node to be converted to a number. May be null.- Returns:
- value of n as a number.
-
toString
Get the value of a node as a string.- Specified by:
toStringin interfaceExpressionContext- Parameters:
n- Node to be converted to a string. May be null.- Returns:
- value of n as a string, or an empty string if n is null.
-
getVariableOrParam
Get a variable based on it's qualified name.- Specified by:
getVariableOrParamin interfaceExpressionContext- Parameters:
qname- The qualified name of the variable.- Returns:
- The evaluated value of the variable.
- Throws:
TransformerException
-