|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.saxon.expr.Expression
net.sf.saxon.expr.FunctionCall
net.sf.saxon.functions.SystemFunction
net.sf.saxon.functions.CollatingFunction
net.sf.saxon.functions.DeepEqual
public class DeepEqual
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 int |
COMPARE_ANNOTATIONS
Flag indicating that elements and attributes must have the same type annotation to be considered deep-equal |
static int |
COMPARE_ID_FLAGS
Flag indicating that the is-id and is-idref flags are to be compared |
static int |
COMPARE_STRING_VALUES
Flag indicating that elements and attributes should always be compared according to their string value, not their typed value |
static int |
EXCLUDE_WHITESPACE_TEXT_NODES
Flag indicating that whitespace text nodes are ignored when comparing element nodes |
static int |
INCLUDE_COMMENTS
Flag indicating that comment children are taken into account when comparing element or document nodes |
static int |
INCLUDE_NAMESPACES
Flag indicating that two elements should only be considered equal if they have the same in-scope namespaces |
static int |
INCLUDE_PREFIXES
Flag indicating that two element or attribute nodes are considered equal only if their names use the same namespace prefix |
static int |
INCLUDE_PROCESSING_INSTRUCTIONS
Flag indicating that processing instruction nodes are taken into account when comparing element or document nodes |
static int |
JOIN_ADJACENT_TEXT_NODES
Flag indicating that adjacent text nodes in the top-level sequence are to be merged |
static 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 |
| Fields inherited from class net.sf.saxon.functions.CollatingFunction |
|---|
stringCollator |
| Fields inherited from class net.sf.saxon.functions.SystemFunction |
|---|
operation |
| Fields inherited from class net.sf.saxon.expr.FunctionCall |
|---|
argument |
| Fields inherited from class net.sf.saxon.expr.Expression |
|---|
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, EVENT_FEED_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, locationId, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, PUSH_SELECTION, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, WATCH_METHOD |
| Constructor Summary | |
|---|---|
DeepEqual()
|
|
| Method Summary | |
|---|---|
SequenceIterator<BooleanValue> |
call(SequenceIterator[] arguments,
XPathContext context)
Evaluate the expression |
static boolean |
deepEquals(SequenceIterator op1,
SequenceIterator op2,
GenericAtomicComparer collator,
Configuration config,
int flags)
Determine when two sequences are deep-equal |
Item |
evaluateItem(XPathContext context)
Evaluate the expression |
Expression |
preEvaluate(ExpressionVisitor visitor)
preEvaluate: if all arguments are known statically, evaluate early |
| Methods inherited from class net.sf.saxon.functions.CollatingFunction |
|---|
checkArguments, copy, equals, expandCollationURI, getAbsoluteCollationURI, getAtomicComparer, getCollator, getExpressionBaseURI, getStringCollator |
| Methods inherited from class net.sf.saxon.functions.SystemFunction |
|---|
addContextDocumentArgument, addDocToPathMap, computeCardinality, computeSpecialProperties, getDetails, getErrorCodeForTypeErrors, getImplementationMethod, getItemType, getOperation, getRequiredType, makeSystemFunction, optimize, setDetails, useContextItemAsDefault |
| Methods inherited from class net.sf.saxon.expr.FunctionCall |
|---|
addExternalFunctionCallToPathMap, checkArgumentCount, explain, getArguments, getDisplayName, getExpressionName, getFunctionName, getNumberOfArguments, hashCode, iterateSubExpressions, promote, replaceSubExpression, setArguments, setFunctionName, simplify, simplifyArguments, toString, typeCheck |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.sf.saxon.expr.CallableExpression |
|---|
getArguments |
| Field Detail |
|---|
public static final int INCLUDE_NAMESPACES
public static final int INCLUDE_PREFIXES
public static final int INCLUDE_COMMENTS
public static final int INCLUDE_PROCESSING_INSTRUCTIONS
public static final int EXCLUDE_WHITESPACE_TEXT_NODES
public static final int COMPARE_STRING_VALUES
public static final int COMPARE_ANNOTATIONS
public static final int WARNING_IF_FALSE
public static final int JOIN_ADJACENT_TEXT_NODES
public static final int COMPARE_ID_FLAGS
| Constructor Detail |
|---|
public DeepEqual()
| Method Detail |
|---|
public Expression preEvaluate(ExpressionVisitor visitor)
throws XPathException
preEvaluate in class FunctionCallvisitor - an expression visitor
XPathException - if evaluation fails
public Item evaluateItem(XPathContext context)
throws XPathException
evaluateItem in class Expressioncontext - The context in which the expression is to be evaluated
XPathException - if any dynamic error occurs evaluating the
expression
public static boolean deepEquals(SequenceIterator op1,
SequenceIterator op2,
GenericAtomicComparer collator,
Configuration config,
int flags)
throws XPathException
op1 - the first sequenceop2 - the second sequencecollator - the collator to be usedconfig - the configuration (gives access to the NamePool)flags - bit-significant integer giving comparison options. Always zero for standard
F+O deep-equals comparison.
XPathException - if either sequence contains a function item
public SequenceIterator<BooleanValue> call(SequenceIterator[] arguments,
XPathContext context)
throws XPathException
CallableExpression
call in interface CallableExpressionarguments - the values of the arguments, supplied as SequenceIteratorscontext - the dynamic evaluation context
XPathException - if a dynamic error occurs during the evaluation of the expression
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||