org.ucl.xpath.function
Class FnLang
java.lang.Object
org.ucl.xpath.function.Function
org.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.
Constructor Summary |
FnLang()
Constructor for FnLang. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FnLang
public FnLang()
- Constructor for FnLang.
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.