An XPath expression.
This can be evaluated in the context of a node to produce a result.
_boolean
public static boolean _boolean(Node context,
Object object)
Implementation of the XPath boolean
function.
_id
public static Collection _id(Node context,
Object object)
The id function selects elements by their unique ID.
When the argument to id is of type node-set, then the result is
the union of the result of applying id to the string-value of each of
the nodes in the argument node-set. When the argument to id is of any
other type, the argument is converted to a string as if by a call to
the string function; the string is split into a whitespace-separated
list of tokens (whitespace is any sequence of characters matching the
production S); the result is a node-set containing the elements in the
same document as the context node that have a unique ID equal to any of
the tokens in the list.
_local_name
public static String _local_name(Node context,
Collection nodeSet)
The local-name function returns the local part of the expanded-name of
the node in the argument node-set that is first in document order. If
the argument node-set is empty or the first node has no expanded-name,
an empty string is returned. If the argument is omitted, it defaults to
a node-set with the context node as its only member.
_name
public static String _name(Node context,
Collection nodeSet)
The name function returns a string containing a QName representing the
expanded-name of the node in the argument node-set that is first in
document order. The QName must represent the expanded-name with respect
to the namespace declarations in effect on the node whose expanded-name
is being represented. Typically, this will be the QName that occurred
in the XML source. This need not be the case if there are namespace
declarations in effect on the node that associate multiple prefixes
with the same namespace. However, an implementation may include
information about the original prefix in its representation of nodes;
in this case, an implementation can ensure that the returned string is
always the same as the QName used in the XML source. If the argument
node-set is empty or the first node has no expanded-name, an empty
string is returned. If the argument it omitted, it defaults to a
node-set with the context node as its only member.
_namespace_uri
public static String _namespace_uri(Node context,
Collection nodeSet)
The namespace-uri function returns the namespace URI of the
expanded-name of the node in the argument node-set that is first in
document order. If the argument node-set is empty, the first node has
no expanded-name, or the namespace URI of the expanded-name is null, an
empty string is returned. If the argument is omitted, it defaults to a
node-set with the context node as its only member.
_number
public static double _number(Node context,
Object object)
Implementation of the XPath number
function.
_string
public static String _string(Node context,
Object object)
Implementation of the XPath string
function.
clone
public Expr clone(Object context)
evaluate
public Object evaluate(Node context,
int pos,
int len)
stringValue
public static String stringValue(Collection nodeSet)
Computes the XPath string-value of the specified node-set.
stringValue
public static String stringValue(Node node)
Computes the XPath string-value of the specified node.