Class DocumentBuilder
Class DomDestination
Class DynamicContext
Class DynamicError
Class EmptyEnumerator
Class ExtensionFunctionCall
Class InvalidityHandlerWrapper
Class NamespaceConstant
Class NullDestination
Class Processor
Class QName
Class SchemaManager
Class SchemaValidator
Class Serializer
Class StandardLogger
Class StaticContext
Class StaticError
Class TextWriterDestination
Class XPathCompiler
Class XPathExecutable
Class XPathSelector
Class XQueryCompiler
Class XQueryEvaluator
Class XQueryExecutable
Class XdmAnyFunctionType
Class XdmAnyItemType
Class XdmAnyNodeType
Class XdmAtomicType
Class XdmAtomicValue
Class XdmDestination
- Class TreeProtector
Class XdmEmptySequence
Class XdmFunctionItem
Class XdmItem
Class XdmItemType
Class XdmNode
Class XdmNodeKind
Class XdmSequenceType
Class XdmValue
Class XmlDestination
Class Xslt30Transformer
Class XsltCompiler
Class XsltExecutable
- Class ParameterDetails
Class XsltPackage
Class XsltTransformer
Enum RecoveryPolicy
Enum SchemaValidationMode
Enum TreeModel
Enum WhitespacePolicy
Enum XdmAxis
Interface IInvalidityHandler
Interface IMessageListener
Interface IQueryResolver
Interface IResultDocumentHandler
Interface IXdmEnumerator
Interface IXmlLocation
Interface SchemaResolver
public class XQueryEvaluator
An XQueryEvaluator
represents a compiled and loaded query ready for execution.
The XQueryEvaluator
holds details of the dynamic evaluation context for the query.
An XQueryEvaluator
should not be used concurrently in multiple threads. It is safe,
however, to reuse the object within a single thread to run the same query several
times.
Running the query does not change the context that has been established.
An XQueryEvaluator
is always constructed by running the Load
method of
an XQueryExecutable
.
Property Summary | |
---|---|
XdmItem |
ContextItem The context item for the query. |
SchemaValidationMode |
SchemaValidationMode
The |
XmlResolver |
InputXmlResolver
The |
StandardLogger |
TraceFunctionDestination
Destination for output of messages produced using <trace()>.
If no specific destination is supplied by the caller, message information will be written to the standard error stream. |
net.sf.saxon.query.DynamicQueryContext |
Implementation
Escape hatch to the |
Method Summary | |
---|---|
void |
SetExternalVariable(QName name, XdmValue value) Set the value of an external variable declared in the query. |
XdmValue |
Evaluate()
Evaluate the query, returning the result as an |
XdmItem |
EvaluateSingle()
Evaluate the query, returning the result as an |
IEnumerator |
GetEnumerator()
Evaluate the query, returning the result as an |
void |
Run(XmlDestination destination) Evaluate the query, sending the result to a specified destination. |
XdmNode[] |
RunUpdate() Execute an updating query. |
XdmValue |
CallFunction(QName function, Saxon.Api.XdmValue[] arguments) Call a global user-defined function in the compiled query. |
Property Detail |
---|
public XdmItem ContextItem {get; set; }
The context item for the query.
This may be either a node or an atomic
value. Most commonly it will be a document node, which might be constructed
using the LoadDocument
method of the Processor
object.
public SchemaValidationMode SchemaValidationMode {get; set; }
The SchemaValidationMode
to be used in this transformation, especially for documents
loaded using the doc()
, document()
, or collection()
functions.
public XmlResolver InputXmlResolver {get; set; }
The XmlResolver
to be used at run-time to resolve and dereference URIs
supplied to the doc()
function.
public StandardLogger TraceFunctionDestination {get; set; }
If no specific destination is supplied by the caller, message information will be written to the standard error stream.
The supplied destination is ignored if a TraceListener
is in use.
Property added in Saxon 9.1
Since 9.6. Changed in 9.6 to use a StandardLogger
public net.sf.saxon.query.DynamicQueryContext Implementation {get; }
Escape hatch to the net.sf.saxon.query.DynamicQueryContext
object in the underlying Java implementation
Method Detail |
---|
Evaluate the query, returning the result as an XdmValue
(that is,
a sequence of nodes and/or atomic values).
XdmValue
representing the results of the query
Saxon.Api.DynamicError
- Throws a DynamicError if any run-time failure
occurs while evaluating the query.
Evaluate the query, returning the result as an XdmItem
(that is,
a single node or atomic value).
XdmItem
representing the result of the query, or null if the query
returns an empty sequence. If the query returns a sequence of more than one item,
any items after the first are ignored.
Saxon.Api.DynamicError
- Throws a DynamicError if any run-time failure
occurs while evaluating the expression.
Evaluate the query, returning the result as an IEnumerator
(that is,
an enumerator over a sequence of nodes and/or atomic values).
XdmItem
. Note
that the query may be evaluated lazily, which means that a successful response
from this method does not imply that the query has executed successfully: failures
may be reported later while retrieving items from the iterator.
Saxon.Api.DynamicError
- Throws a DynamicError if any run-time failure
occurs while evaluating the expression.
Evaluate the query, sending the result to a specified destination.
Parameters:destination
-
XmlDestination
is an abstraction that allows a number of different kinds of destination
to be specified.
Saxon.Api.DynamicError
- Throws a DynamicError if any run-time failure
occurs while evaluating the expression.
Execute an updating query.
Saxon.Api.DynamicError
- Throws a DynamicError if any run-time failure
occurs while evaluating the expression, or if the expression is not an
updating query.
Call a global user-defined function in the compiled query.
If this is called more than once (to evaluate the same function repeatedly with different arguments, or to evaluate different functions) then the sequence of evaluations uses the same values of global variables including external variables (query parameters); the effect of any changes made to query parameters between calls is undefined.
Parameters:function
-
arguments
-
System.ArgumentException
- If no function has been defined with the given name and arity
or if any of the arguments does not match its required type according to the function
signature.
Saxon.Api.DynamicError
- If a dynamic error occurs in evaluating the function.
Set the value of an external variable declared in the query.
Parameters:name
-value
-