org.ucl.xpath.function
Class FnLang

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

public class FnLang
extends Function

This function tests whether the language of $node, or the context node if the second argument is omitted, as specified by xml:lang attributes is the same as, or is a sublanguage of, the language specified by $testlang. The language of the argument node, or the context node if the second argument is omitted, is determined by the value of the xml:lang attribute on the node, or, if the node has no such attribute, by the value of the xml:lang attribute on the nearest ancestor of the node that has an xml:lang attribute. If there is no such ancestor, then the function returns false.


Field Summary
 
Fields inherited from class org.ucl.xpath.function.Function
_arity, _fl, _name
 
Constructor Summary
FnLang()
          Constructor for FnLang.
 
Method Summary
 ResultSequence evaluate(java.util.Collection args)
          Evaluate arguments.
static java.util.Collection expected_args()
          Obtain a list of expected arguments.
static ResultSequence lang(java.util.Collection args)
          Language 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

FnLang

public FnLang()
Constructor for FnLang.

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.

lang

public static ResultSequence lang(java.util.Collection args)
                           throws DynamicError
Language operation.

Parameters:
args - Result from the expressions evaluation.
Returns:
Result of fn:lang operation.
Throws:
DynamicError - Dynamic error.

expected_args

public static java.util.Collection expected_args()
Obtain a list of expected arguments.

Returns:
Result of operation.