org.ucl.xpath.function
Class FnStringLength

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

public class FnStringLength
extends Function

Function to calculate string length.

Usage: fn:string-length($arg as xs:string?) as xs:integer

This class returns an xs:integer equal to the length in characters of the value of $arg.

If the value of $arg is the empty sequence, the xs:integer 0 is returned.


Field Summary
 
Fields inherited from class org.ucl.xpath.function.Function
_arity, _fl, _name
 
Constructor Summary
FnStringLength()
          Constructor for FnStringLength
 
Method Summary
 ResultSequence evaluate(java.util.Collection args)
          Evaluate the arguments.
static java.util.Collection expected_args()
          Calculate the expected arguments.
static ResultSequence string_length(java.util.Collection args)
          Obtain the string length of the arguments.
 
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

FnStringLength

public FnStringLength()
Constructor for FnStringLength

Method Detail

evaluate

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

Specified by:
evaluate in class Function
Parameters:
args - are evaluated.
Returns:
The evaluation of the string length of the arguments.
Throws:
DynamicError - Dynamic error.

string_length

public static ResultSequence string_length(java.util.Collection args)
                                    throws DynamicError
Obtain the string length of the arguments.

Parameters:
args - are used to obtain the string length.
Returns:
The result of obtaining the string length from the arguments.
Throws:
DynamicError - Dynamic error.

expected_args

public static java.util.Collection expected_args()
Calculate the expected arguments.

Returns:
The expected arguments.