org.ucl.xpath.function
Class FnNumber

java.lang.Object
  extended byorg.ucl.xpath.function.Function
      extended byorg.ucl.xpath.function.FnNumber

public class FnNumber
extends Function

Returns the value indicated by $arg or, if $arg is not specified, the context item after atomization, converted to an xs:double. If $arg or the context item cannot be converted to an xs:double, the xs:double value NaN is returned. If the context item is undefined an error is raised: [err:FONC0001].


Field Summary
 
Fields inherited from class org.ucl.xpath.function.Function
_arity, _fl, _name
 
Constructor Summary
FnNumber()
          Constructor for FnNumber.
 
Method Summary
 ResultSequence evaluate(java.util.Collection args)
          Evaluate arguments.
static ResultSequence fn_number(ResultSequence arg, DynamicContext dc)
          Number operation.
 
Methods inherited from class org.ucl.xpath.function.Function
arity, convert_argument, convert_arguments, dynamic_context, name, set_function_library, signature, signature, signature, static_context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FnNumber

public FnNumber()
Constructor for FnNumber.

Method Detail

evaluate

public ResultSequence evaluate(java.util.Collection args)
                        throws DynamicError
Evaluate arguments.

Specified by:
evaluate in class Function
Parameters:
args - argument expressions.
Returns:
Result of evaluation.
Throws:
DynamicError - Dynamic error.

fn_number

public static ResultSequence fn_number(ResultSequence arg,
                                       DynamicContext dc)
                                throws DynamicError
Number operation.

Parameters:
arg - Result from the expressions evaluation.
dc - Result of dynamic context operation.
Returns:
Result of fn:number operation.
Throws:
DynamicError - Dynamic error.