|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sf.saxon.query.DynamicQueryContext
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.
Constructor Summary | |
DynamicQueryContext()
|
Method Summary | |
void |
clearParameters()
Reset the parameters to an empty list. |
NodeInfo |
getContextNode()
Get the context node for the query, as set using setContextNode(). |
javax.xml.transform.ErrorListener |
getErrorListener()
Get the error listener. |
java.lang.Object |
getParameter(java.lang.String expandedName)
Get a parameter to the transformation. |
protected java.util.HashMap |
getParameters()
Get the supplied parameters as a HashMap |
javax.xml.transform.URIResolver |
getURIResolver()
Get the URI resolver. |
void |
setContextNode(NodeInfo node)
Set the context node for evaluating the expression. |
void |
setErrorListener(javax.xml.transform.ErrorListener listener)
Set the error listener. |
void |
setParameter(java.lang.String expandedName,
java.lang.Object value)
Set a parameter for the query. |
void |
setURIResolver(javax.xml.transform.URIResolver resolver)
Set an object that will be used to resolve URIs used in fn:document() and related functions. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DynamicQueryContext()
Method Detail |
public void setContextNode(NodeInfo node)
node
- The node that is to be the context node for the querypublic NodeInfo getContextNode()
public void setParameter(java.lang.String expandedName, java.lang.Object value)
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 been
declared, the parameter will simply be ignored. If the parameter has
been declared in the query (as an external global variable) then it
will be initialized with the value supplied.value
- The value of the parameter. This can be any valid Java
object. It follows the same conversion rules as a value returned
from a Saxon extension function. An error will occur at query
execution time if the supplied value cannot be converted to the required
type as declared in the query. For precise control of the type of the
value, instantiate one of the classes in the net.sf.saxon.value package,
for example net.sf.saxon.value.DayTimeDuration.public void clearParameters()
public java.lang.Object getParameter(java.lang.String expandedName)
expandedName
- the name of the required parameter, in
"{uri}local-name" format
protected java.util.HashMap getParameters()
public void setURIResolver(javax.xml.transform.URIResolver resolver)
resolver
- An object that implements the URIResolver interface, or
null.public javax.xml.transform.URIResolver getURIResolver()
public void setErrorListener(javax.xml.transform.ErrorListener listener)
listener
- the ErrorListener to be usedpublic javax.xml.transform.ErrorListener getErrorListener()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |