net.sf.saxon.functions

Class DeepEqual

public class DeepEqual extends CollatingFunction

XSLT 2.0 deep-equal() function. Supports deep comparison of two sequences (of nodes and/or atomic values) optionally using a collation
Field Summary
static intCOMPARE_ANNOTATIONS
Flag indicating that elements and attributes must have the same type annotation to be considered deep-equal
static intCOMPARE_STRING_VALUES
Flag indicating that elements and attributes should always be compared according to their string value, not their typed value
static intEXCLUDE_WHITESPACE_TEXT_NODES
Flag indicating that whitespace text nodes are ignored when comparing element nodes
static intINCLUDE_COMMENTS
Flag indicating that comment children are taken into account when comparing element or document nodes
static intINCLUDE_NAMESPACES
Flag indicating that two elements should only be considered equal if they have the same in-scope namespaces
static intINCLUDE_PREFIXES
Flag indicating that two element or attribute nodes are considered equal only if their names use the same namespace prefix
static intINCLUDE_PROCESSING_INSTRUCTIONS
Flag indicating that processing instruction nodes are taken into account when comparing element or document nodes
static intWARNING_IF_FALSE
Flag indicating that a warning message explaining the reason why the sequences were deemed non-equal should be sent to the ErrorListener
Method Summary
static booleandeepEquals(SequenceIterator op1, SequenceIterator op2, AtomicComparer collator, Configuration config, int flags)
Determine when two sequences are deep-equal
ItemevaluateItem(XPathContext context)
Evaluate the expression
ExpressionpreEvaluate(StaticContext env)
preEvaluate: if all arguments are known statically, evaluate early

Field Detail

COMPARE_ANNOTATIONS

public static final int COMPARE_ANNOTATIONS
Flag indicating that elements and attributes must have the same type annotation to be considered deep-equal

COMPARE_STRING_VALUES

public static final int COMPARE_STRING_VALUES
Flag indicating that elements and attributes should always be compared according to their string value, not their typed value

EXCLUDE_WHITESPACE_TEXT_NODES

public static final int EXCLUDE_WHITESPACE_TEXT_NODES
Flag indicating that whitespace text nodes are ignored when comparing element nodes

INCLUDE_COMMENTS

public static final int INCLUDE_COMMENTS
Flag indicating that comment children are taken into account when comparing element or document nodes

INCLUDE_NAMESPACES

public static final int INCLUDE_NAMESPACES
Flag indicating that two elements should only be considered equal if they have the same in-scope namespaces

INCLUDE_PREFIXES

public static final int INCLUDE_PREFIXES
Flag indicating that two element or attribute nodes are considered equal only if their names use the same namespace prefix

INCLUDE_PROCESSING_INSTRUCTIONS

public static final int INCLUDE_PROCESSING_INSTRUCTIONS
Flag indicating that processing instruction nodes are taken into account when comparing element or document nodes

WARNING_IF_FALSE

public static final int WARNING_IF_FALSE
Flag indicating that a warning message explaining the reason why the sequences were deemed non-equal should be sent to the ErrorListener

Method Detail

deepEquals

public static boolean deepEquals(SequenceIterator op1, SequenceIterator op2, AtomicComparer collator, Configuration config, int flags)
Determine when two sequences are deep-equal

Parameters: op1 the first sequence op2 the second sequence collator the collator to be used config the configuration (gives access to the NamePool) flags bit-significant integer giving comparison options. Always zero for standard F+O deep-equals comparison.

Returns: true if the sequences are deep-equal

evaluateItem

public Item evaluateItem(XPathContext context)
Evaluate the expression

preEvaluate

public Expression preEvaluate(StaticContext env)
preEvaluate: if all arguments are known statically, evaluate early