gnu.xml.xpath

Class IdFunction

Implemented Interfaces:
XPathExpression

public final class IdFunction
extends Pattern

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.

Field Summary

Fields inherited from class gnu.xml.xpath.Expr

decimalFormat, documentOrderComparator

Constructor Summary

IdFunction(Expr arg)

Method Summary

Expr
clone(Object context)
Object
evaluate(Node context, int pos, int len)
boolean
matches(Node context)
String
toString()

Methods inherited from class gnu.xml.xpath.Pattern

matches

Methods inherited from class gnu.xml.xpath.Expr

_boolean, _id, _local_name, _name, _namespace_uri, _number, _string, clone, evaluate, evaluate, evaluate, evaluate, evaluate, stringValue, stringValue

Constructor Details

IdFunction

public IdFunction(Expr arg)

Method Details

clone

public Expr clone(Object context)
Overrides:
clone in interface Expr


evaluate

public Object evaluate(Node context,
                       int pos,
                       int len)
Overrides:
evaluate in interface Expr


matches

public boolean matches(Node context)
Overrides:
matches in interface Pattern


toString

public String toString()