| java.lang.Object net.sf.saxon.query.DynamicQueryContext
DynamicQueryContext | public class DynamicQueryContext (Code) | | This object represents a dynamic context for query execution. This class is used
by the application writer to set up aspects of the dynamic context; it is not used
operationally (or modified) by the XQuery processor itself, which copies all required
information into its own internal representation.
|
clearParameters | public void clearParameters()(Code) | | Reset the parameters to an empty list.
|
getContextItem | public Item getContextItem()(Code) | | Get the context item for the query, as set using setContextItem() or setContextNode().
the context item if set, or null otherwise. since: 8.4 |
getContextNode | public NodeInfo getContextNode()(Code) | | Get the context node for the query, as set using setContextNode()
or getContextItem() (provided the item is a node).
the context node if set, or null otherwise. |
getErrorListener | public ErrorListener getErrorListener()(Code) | | Get the error listener.
the ErrorListener in use since: 8.4 |
getParameter | public Object getParameter(String expandedName)(Code) | | Get the actual value of a parameter to the query.
Parameters: expandedName - the name of the required parameter, in"{uri}local-name" format the value of the parameter, if it exists, or null otherwise |
getParameters | protected HashMap getParameters()(Code) | | Get the supplied parameters as a HashMap
|
getURIResolver | public URIResolver getURIResolver()(Code) | | Get the URI resolver.
the user-supplied URI resolver if there is one, or thesystem-defined one otherwise since: 8.4 |
setContextItem | public void setContextItem(Item item)(Code) | | Set the context item for evaluating the expression. If this method is not called,
the context node will be undefined. The context item is available as the value of
the expression ".",.
To obtain a node by parsing a source document, see the method
net.sf.saxon.query.StaticQueryContext.buildDocument buildDocument in class QueryProcessor.
Parameters: item - The item that is to be the context item for the query since: 8.4 |
setContextNode | public void setContextNode(NodeInfo node)(Code) | | Set the context item for evaluating the expression to be a node. If this method is not called,
the context node will be undefined. The context node is available as the value of
the expression ".".
To obtain a NodeInfo by parsing a source document, see the method
net.sf.saxon.query.StaticQueryContext.buildDocument buildDocument in class QueryProcessor.
Parameters: node - The node that is to be the context node for the query since: 8.4 |
setCurrentDateTime | public void setCurrentDateTime(DateTimeValue dateTime) throws XPathException(Code) | | Set a value to be used as the current date and time for the query. By default, the "real" current date and
time are used. The main purpose of this method is that it allows repeatable results to be achieved when
testing queries
Parameters: dateTime - The value to be used as the current date and time. This must include a timezone. since: 8.5 |
setErrorListener | public void setErrorListener(ErrorListener listener)(Code) | | Set the error listener. The error listener receives reports of all run-time
errors and can decide how to report them.
Parameters: listener - the ErrorListener to be used since: 8.4 |
setParameter | public void setParameter(String expandedName, Object value)(Code) | | Set a parameter for the query.
Parameters: expandedName - The name of the parameter in "{uri}local-name" format.It is not an error to supply a value for a parameter that has not beendeclared, the parameter will simply be ignored. If the parameter hasbeen declared in the query (as an external global variable) then itwill be initialized with the value supplied. Parameters: value - The value of the parameter. This can be any valid Javaobject. It follows the same conversion rules as a value returnedfrom a Saxon extension function. An error will occur at queryexecution time if the supplied value cannot be converted to the requiredtype as declared in the query. For precise control of the type of thevalue, instantiate one of the classes in the net.sf.saxon.value package,for example net.sf.saxon.value.DayTimeDuration. since: 8.4 |
setURIResolver | public void setURIResolver(URIResolver resolver)(Code) | | Set an object that will be used to resolve URIs used in
fn:document() and related functions.
Parameters: resolver - An object that implements the URIResolver interface, ornull. since: 8.4 |
|
|