/** * <p> * Returns the number of nodes in the specified node-set. * </p> * @param context ignored * @param args the function arguments * * @return a <code>Double</code> giving the integral number of items in the first argument * * @throws FunctionCallException if args does not have exactly one * item; or that item is not a <code>List</code> */ public Object call(Context context, List args) throws FunctionCallException { if (args.size() == 1) { return evaluate( args.get(0) ); } throw new FunctionCallException( "count() requires one argument." ); }