public class CountFunction extends Object implements Function
4.1 number count(node-set)
The count function returns the number of nodes in the argument node-set.
| Constructor and Description |
|---|
CountFunction()
Create a new
CountFunction object. |
public Object call(Context context, List args) throws FunctionCallException
Returns the number of nodes in the specified node-set.
call in interface Functioncontext - ignoredargs - the function argumentsDouble giving the integral number of items in the first argumentFunctionCallException - if args does not have exactly one
item; or that item is not a Listpublic static Double evaluate(Object obj) throws FunctionCallException
Returns the number of nodes in the specified node-set.
obj - a List of nodesFunctionCallException - if obj is not a ListCopyright © 2001-2012 Codehaus. All Rights Reserved.