/** * Returns the position of the context node in the context node-set. * * @param context the context at the point in the * expression where the function is called * @param args an empty list * * @return a <code>Double</code> containing the context position * * @throws FunctionCallException if <code>args</code> is not empty * * @see Context#getSize() */ public Object call(Context context, List args) throws FunctionCallException { if ( args.size() == 0 ) { return evaluate( context ); } throw new FunctionCallException( "position() does not take any arguments." ); }
new PositionFunction() );
"position", new PositionFunction());
"position", new PositionFunction());