public class ValidateFn extends SystemFunction
There are three arguments: (a) the node to be validated (element, document, or attribute) (b) (optional) a map containing validation options (c) (optional) a map containing validation parameters (values for saxon:param)
The result of the function is a map containing the possible entries: (a) "valid: a boolean indicating whether validation succeeded (b) "node": the validated node, with type annotations (a copy of the original) (c) "errors": a list of error objects, each of which is a map with various entries holding details of the error
Constructor and Description |
---|
ValidateFn() |
Modifier and Type | Method and Description |
---|---|
ZeroOrOne<MapItem> |
call(XPathContext context,
Sequence[] arguments)
Evaluate this function call at run-time
|
dependsOnContextItem, dynamicCall, equals, export, exportAdditionalArguments, exportAttributes, fixArguments, getArity, getCardinality, getCompilerName, getContextNode, getDescription, getDetails, getErrorCodeForTypeErrors, getFunctionItemType, getFunctionName, getIntegerBounds, getNetCost, getOperandRoles, getRequiredType, getResultItemType, getResultItemType, getRetainedStaticContext, getSpecialProperties, getStaticBaseUriString, getStreamerName, importAttributes, isTrustedResultType, makeCall, makeFunction, makeFunctionCall, makeOptimizedFunctionCall, resultIfEmpty, setArity, setDetails, setRetainedStaticContext, supplyTypeInformation, toShortString, toString, typeCheckCaller
atomize, deepEquals, effectiveBooleanValue, getAnnotations, getStringValue, getStringValueCS, isArray, isMap, makeNewContext, simplify, typeCheck
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
argumentArray, getGenre
getLength, head, isStreamed, itemAt, iterate, iterator, reduce, subsequence, toGroundedValue
asIterable, materialize
makeRepeatable
public ZeroOrOne<MapItem> call(XPathContext context, Sequence[] arguments) throws XPathException
context
- The XPath dynamic evaluation contextarguments
- The values of the arguments to the function call. Each argument value (which is in general
a sequence) is supplied in the form of an iterator over the items in the sequence. If required, the
supplied sequence can be materialized by calling, for example, new SequenceExtent(arguments[i])
.
If the argument is always a singleton, then the single item may be obtained by calling
arguments[i].next()
. The implementation is not obliged to read all the items in each
SequenceIterator
if they are not required to compute the result; but if any SequenceIterator is not read
to completion, it is good practice to call its close() method.XPathException
- if a dynamic error occurs during evaluation of the function. The Saxon run-time
code will add information about the error location.Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.