|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ucl.xpath.function.Function org.ucl.xpath.function.FnCompare
String comparison function.
Usage: fn:compare($comparand1 as xs:string?, $comparand2 as xs:string?) as xs:integer?
This class returns -1, 0, or 1, depending on whether the value of $comparand1 is respectively less than, equal to, or greater than the value of $comparand2.
If the value of $comparand2 begins with a string that is equal to the value of $comparand1 (according to the collation that is used) and has additional code points following that beginning string, then the result is -1. If the value of $comparand1 begins with a string that is equal to the value of $comparand2 and has additional code points following that beginning string, then the result is 1.
If either argument is the empty sequence, the result is the empty sequence.
Field Summary |
Fields inherited from class org.ucl.xpath.function.Function |
_arity, _fl, _name |
Constructor Summary | |
FnCompare()
Constructor of FnCompare. |
Method Summary | |
static ResultSequence |
compare(java.util.Collection args)
Compare the arguments. |
ResultSequence |
evaluate(java.util.Collection args)
Evaluate the arguments. |
static java.util.Collection |
expected_args()
Calculate the expected 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 |
public FnCompare()
Method Detail |
public ResultSequence evaluate(java.util.Collection args) throws DynamicError
evaluate
in class Function
args
- is evaluated.
DynamicError
- Dynamic error.public static ResultSequence compare(java.util.Collection args) throws DynamicError
args
- are compared.
DynamicError
- Dynamic error.public static java.util.Collection expected_args()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |