APIdia Launch Partner
Top Description Methods
com.sun.org.apache.xalan.internal.extensions

public Interface ExpressionContext

Known Direct Implementers
com.sun.org.apache.xpath.internal.XPathContext.XPathExpressionContext
Imports
javax.xml.transform.ErrorListener, com.sun.org.apache.xpath.internal.objects.XObject, org.w3c.dom.Node, org.w3c.dom.traversal.NodeIterator

An object that implements this interface can supply information about the current XPath expression context.

Method Summary

Modifier and TypeMethod and Description
public Node

Returns:

The current context node.
getContextNode
()

Get the current context node.

public NodeIterator

Returns:

An iterator for the current context list, as defined in XSLT.
getContextNodes
()

Get the current context node list.

public ErrorListener

Returns:

The registered error listener.
getErrorListener
()

Get the error listener.

public XObject

Returns:

The evaluated value of the variable.
getVariableOrParam
(QName
The qualified name of the variable.
qname
)

Get a variable based on it's qualified name.

public XPathContext

Returns:

The current XPathContext.
getXPathContext
()

Get the XPathContext that owns this ExpressionContext.

public double

Returns:

value of n as a number.
toNumber
(Node
Node to be converted to a number. May be null.
n
)

Get the value of a node as a number.

public String

Returns:

value of n as a string, or an empty string if n is null.
toString
(Node
Node to be converted to a string. May be null.
n
)

Get the value of a node as a string.

Method Detail

getContextNodeback to summary
public Node getContextNode()

Get the current context node.

Returns:Node

The current context node.

getContextNodesback to summary
public NodeIterator getContextNodes()

Get the current context node list.

Returns:NodeIterator

An iterator for the current context list, as defined in XSLT.

getErrorListenerback to summary
public ErrorListener getErrorListener()

Get the error listener.

Returns:ErrorListener

The registered error listener.

getVariableOrParamback to summary
public XObject getVariableOrParam(QName qname) throws TransformerException

Get a variable based on it's qualified name.

Parameters
qname:QName

The qualified name of the variable.

Returns:XObject

The evaluated value of the variable.

getXPathContextback to summary
public XPathContext getXPathContext() throws TransformerException

Get the XPathContext that owns this ExpressionContext.

Note

exslt:function requires the XPathContext to access the variable stack and TransformerImpl.

Returns:XPathContext

The current XPathContext.

toNumberback to summary
public double toNumber(Node n)

Get the value of a node as a number.

Parameters
n:Node

Node to be converted to a number. May be null.

Returns:double

value of n as a number.

toStringback to summary
public String toString(Node n)

Get the value of a node as a string.

Parameters
n:Node

Node to be converted to a string. May be null.

Returns:String

value of n as a string, or an empty string if n is null.