org.ucl.xpath.function
Class FnDeepEqual

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

public class FnDeepEqual
extends Function

The function assesses whether two sequences are deep-equal to each other. To be deep-equal, they must contain items that are pairwise deep-equal; and for two items to be deep-equal, they must either by atomic values that compare equal, or nodes of the same kind, with the same name, whose children are deep-equal. This is defined in more detail below. The $collation argument identifies a collation which is used at all levels of recursion when strings are compared (but not when names are compared), according to the rules in 7.3.1 Collations in the specification.


Field Summary
 
Fields inherited from class org.ucl.xpath.function.Function
_arity, _fl, _name
 
Constructor Summary
FnDeepEqual()
          Constructor for FnDeepEqual.
 
Method Summary
static boolean deep_equal(AnyAtomicType one, AnyAtomicType two)
          Deep-Equal boolean operation for inputs of any atomic type.
static boolean deep_equal(AnyType one, AnyType two)
          Deep-Equal boolean operation for inputs of any type.
static ResultSequence deep_equal(java.util.Collection args)
          Deep-Equal expression operation.
static boolean deep_equal(NodeType one, NodeType two)
          Deep-Equal boolean operation for inputs of node type.
static boolean deep_equal(ResultSequence one, ResultSequence two)
          Deep-Equal boolean operation.
 ResultSequence evaluate(java.util.Collection args)
          Evaluate 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

FnDeepEqual

public FnDeepEqual()
Constructor for FnDeepEqual.

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.

deep_equal

public static ResultSequence deep_equal(java.util.Collection args)
                                 throws DynamicError
Deep-Equal expression operation.

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

deep_equal

public static boolean deep_equal(ResultSequence one,
                                 ResultSequence two)
Deep-Equal boolean operation.

Parameters:
one - input1 xpath expression/variable.
two - input2 xpath expression/variable.
Returns:
Result of fn:deep-equal operation.

deep_equal

public static boolean deep_equal(AnyType one,
                                 AnyType two)
Deep-Equal boolean operation for inputs of any type.

Parameters:
one - input1 xpath expression/variable.
two - input2 xpath expression/variable.
Returns:
Result of fn:deep-equal operation.

deep_equal

public static boolean deep_equal(AnyAtomicType one,
                                 AnyAtomicType two)
Deep-Equal boolean operation for inputs of any atomic type.

Parameters:
one - input1 xpath expression/variable.
two - input2 xpath expression/variable.
Returns:
Result of fn:deep-equal operation.

deep_equal

public static boolean deep_equal(NodeType one,
                                 NodeType two)
Deep-Equal boolean operation for inputs of node type.

Parameters:
one - input1 xpath expression/variable.
two - input2 xpath expression/variable.
Returns:
Result of fn:deep-equal operation.