|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jaxen.function.IdFunction
4.1 node-set id(object)
The id function returns a List
of all the elements in the context document that have an ID
matching one of a specified list of IDs. How an attribute is determined
to be of type ID depends on the navigator, but it normally requires that
the attribute be declared to have type ID in the DTD.
| Constructor Summary | |
IdFunction()
Create a new IdFunction object. |
|
| Method Summary | |
java.lang.Object |
call(Context context,
java.util.List args)
Returns the node with the specified ID. |
static java.util.List |
evaluate(java.util.List contextNodes,
java.lang.Object arg,
Navigator nav)
Returns the node with the specified ID. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public IdFunction()
IdFunction object.
| Method Detail |
public java.lang.Object call(Context context,
java.util.List args)
throws FunctionCallException
call in interface Functioncontext - the context at the point in the
expression when the function is calledargs - a list with exactly one item which is either a string
a node-set
List containing the node with the specified ID; or
an empty list if there is no such node
FunctionCallException - if args has more or less than one item
public static java.util.List evaluate(java.util.List contextNodes,
java.lang.Object arg,
Navigator nav)
contextNodes - the context node-set. The first item in this list
determines the document in which the search is performed.arg - the ID or IDs to search fornav - the navigator used to calculate string-values and search
by ID
List containing the node with the specified ID; or
an empty list if there is no such node
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||