Package net.sf.saxon.functions
Class DeepEqual
- java.lang.Object
-
- net.sf.saxon.functions.AbstractFunction
-
- net.sf.saxon.functions.SystemFunction
-
- net.sf.saxon.functions.CollatingFunctionFixed
-
- net.sf.saxon.functions.DeepEqual
-
- All Implemented Interfaces:
Callable
,StatefulSystemFunction
,FunctionItem
,GroundedValue
,Item
,Sequence
public class DeepEqual extends CollatingFunctionFixed
XSLT 2.0 deep-equal() function, where the collation is already known. Supports deep comparison of two sequences (of nodes and/or atomic values) optionally using a collation
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DeepEqual.DeepEqualOptions
-
Field Summary
Fields Modifier and Type Field Description static OptionsParameter
OPTION_DETAILS
-
Constructor Summary
Constructors Constructor Description DeepEqual()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BooleanValue
call(XPathContext context, Sequence[] arguments)
Execute a dynamic call to the functionstatic java.lang.String
deepEqual(NodeInfo n1, NodeInfo n2, XPathContext context, DeepEqual.DeepEqualOptions options)
static boolean
deepEqual(SequenceIterator op1, SequenceIterator op2, XPathContext context, DeepEqual.DeepEqualOptions options)
Determine when two sequences are deep-equaljava.lang.String
getStreamerName()
Get a name that identifies the class that can be used to evaluate this function in streaming mode, that is, supplying one item or event at a time as it is delivered by the parser.Expression
makeFunctionCall(Expression... arguments)
Make an expression that either calls this function, or that is equivalent to a call on this function-
Methods inherited from class net.sf.saxon.functions.CollatingFunctionFixed
copy, exportAttributes, getAtomicComparer, getPreAllocatedAtomicComparer, getStringCollator, importAttributes, isSubstringMatchingFunction, preAllocateComparer, setCollationName, setRetainedStaticContext
-
Methods inherited from class net.sf.saxon.functions.SystemFunction
dependsOnContextItem, dynamicCall, equals, export, exportAdditionalArguments, fixArguments, getArity, getCardinality, getContextNode, getDescription, getDetails, getElaborator, getErrorCodeForTypeErrors, getFunctionItemType, getFunctionName, getIntegerBounds, getNetCost, getOperandRoles, getRequiredType, getResultItemType, getResultItemType, getRetainedStaticContext, getSpecialProperties, getStaticBaseUriString, getUniStringArg, hashCode, isSequenceVariadic, isTrustedResultType, makeCall, makeFunction, makeFunction40, makeOptimizedFunctionCall, resultIfEmpty, setArity, setDetails, supplyTypeInformation, toShortString, toString, typeCheckCaller
-
Methods inherited from class net.sf.saxon.functions.AbstractFunction
atomize, deepEqual40, deepEquals, effectiveBooleanValue, getAnnotations, getUnicodeStringValue, isArray, isMap, makeNewContext, simplify, typeCheck
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.sf.saxon.om.FunctionItem
getGenre
-
Methods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, concatenate, containsNode, materialize
-
Methods inherited from interface net.sf.saxon.om.Item
getLength, getStringValue, head, isStreamed, itemAt, iterate, reduce, subsequence
-
Methods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
-
-
-
Field Detail
-
OPTION_DETAILS
public static OptionsParameter OPTION_DETAILS
-
-
Method Detail
-
makeFunctionCall
public Expression makeFunctionCall(Expression... arguments)
Description copied from class:SystemFunction
Make an expression that either calls this function, or that is equivalent to a call on this function- Overrides:
makeFunctionCall
in classSystemFunction
- Parameters:
arguments
- the supplied arguments to the function call- Returns:
- either a function call on this function, or an expression that delivers the same result
-
deepEqual
public static boolean deepEqual(SequenceIterator op1, SequenceIterator op2, XPathContext context, DeepEqual.DeepEqualOptions options) throws XPathException
Determine when two sequences are deep-equal- Parameters:
op1
- the first sequenceop2
- the second sequencecontext
- the XPathContext itemoptions
- comparison options.- Returns:
- true if the sequences are deep-equal
- Throws:
XPathException
- if either sequence contains a function item
-
deepEqual
public static java.lang.String deepEqual(NodeInfo n1, NodeInfo n2, XPathContext context, DeepEqual.DeepEqualOptions options) throws XPathException
- Throws:
XPathException
-
call
public BooleanValue call(XPathContext context, Sequence[] arguments) throws XPathException
Execute a dynamic call to the function- Parameters:
context
- the dynamic evaluation contextarguments
- the values of the arguments, supplied as Sequences.- Returns:
- the result of the evaluation, in the form of a Sequence. It is the responsibility of the callee to ensure that the type of result conforms to the expected result type.
- Throws:
XPathException
- (should not happen)
-
getStreamerName
public java.lang.String getStreamerName()
Description copied from class:SystemFunction
Get a name that identifies the class that can be used to evaluate this function in streaming mode, that is, supplying one item or event at a time as it is delivered by the parser. Special streaming support is generally available in Saxon-EE for all system functions that take a sequence as their argument.- Overrides:
getStreamerName
in classSystemFunction
- Returns:
- a name that identifies a class that supports streamed evaluation of this system
function, or null if no such class is available. The mapping of names to classes is
defined in the Saxon-EE class
StreamerMap
. In non-streaming Saxon editions (HE and PE) the method always returns null.
-
-