<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_18) on Fri Dec 09 20:48:46 GMT 2011 --> <TITLE> XQDynamicContext </TITLE> <META NAME="date" CONTENT="2011-12-09"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="XQDynamicContext"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/xml/xquery/XQDataSource.html" title="interface in javax.xml.xquery"><B>PREV CLASS</B></A> <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?javax/xml/xquery/XQDynamicContext.html" target="_top"><B>FRAMES</B></A> <A HREF="XQDynamicContext.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> javax.xml.xquery</FONT> <BR> Interface XQDynamicContext</H2> <DL> <DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../javax/xml/xquery/XQExpression.html" title="interface in javax.xml.xquery">XQExpression</A>, <A HREF="../../../javax/xml/xquery/XQPreparedExpression.html" title="interface in javax.xml.xquery">XQPreparedExpression</A></DD> </DL> <DL> <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../net/sf/saxon/xqj/SaxonXQDynamicContext.html" title="class in net.sf.saxon.xqj">SaxonXQDynamicContext</A>, <A HREF="../../../net/sf/saxon/xqj/SaxonXQExpression.html" title="class in net.sf.saxon.xqj">SaxonXQExpression</A>, <A HREF="../../../net/sf/saxon/xqj/SaxonXQPreparedExpression.html" title="class in net.sf.saxon.xqj">SaxonXQPreparedExpression</A></DD> </DL> <HR> <DL> <DT><PRE>public interface <B>XQDynamicContext</B></DL> </PRE> <P> <code>XQDynamicContext</code> provides access to the dynamic context as defined in <a href="http://www.w3.org/TR/xquery/#eval_context"><i>2.1.2 Dynamic Context, XQuery 1.0: An XML Query Language</i></a>. The following components can be accessed: <ul> <li>The context item can be set</li> <li>The variable values can be bound</li> <li>The implicit time zone can be retrieved or specified</li> </ul> Where the prolog of the expression specifies the static type of external variables, this interface allows the dynamic type and value of the variable to be specified. Note that in case of an <code>XQPreparedExpression</code>, values may only be bound to those variables that are defined in the prolog of the expression. <p> Example - <pre> XQConnection conn = XQDataSource.getConnection(); // create an XQPreparedExpression with external variable XQPreparedExpression e1 = conn.prepareExpression("declare variable $i as xs:int external; $i + 10"); // bind an int to the external variable e1.bindInt(new QName("i"), 200, null); // this will fail as the expression has no external variable $foo e1.bindInt(new QName("foo"), 200, null); // this will fail as xs:double is not compatible with an external variable declared as xs:int e1.bindDouble(new QName("i"), 2e2, null); // create an XQExpression with external variable XQExpression e2 = conn.createExpression(); // bind a value to $i and $foo e2.bindInt(new QName("i"), 200, null); e2.bindInt(new QName("foo"), 200, null); // the value bound to $foo is ignored as the expression doesn't // declare $foo as external variable e2.executeQuery("declare variable $i as xs:int external; $i + 10"); </pre> <br> <br> Binding a value to the context item is achieved in the same way as binding a value to an external variable. However, instead of specifying the variable's name as first argument of the <code>bindXXX()</code> method, use <A HREF="../../../javax/xml/xquery/XQConstants.html#CONTEXT_ITEM"><CODE>XQConstants.CONTEXT_ITEM</CODE></A> as the first argument. <br> <br> <b>Binding mode</b> <p> The default binding mode is immediate. In other words, the external variable value specified by the application is consumed during the <code>bindXXX()</code> method. <p> An application has the ability to set the binding mode to deferred. In deferred mode an application cannot assume that the bound value will be consumed during the invocation of the <code>bindXXX</code> method. In such scenario the order in which the bindings are evaluated is implementation-dependent, and an implementation doesn't necessarily need to consume a binding if it can evaluate the query without requiring the external variable. The XQJ implementation is also free to read the bound value either at bind time or during the subsequent evaluation and processing of the query results. <p> Also note that in deferred binding mode, bindings are only active for a single execution cycle. The application is required to explicitly re-bind values to every external variable before each execution. Failing to do so will result in an <code>XQException</code>, as the implementation will assume during the next execution that none of the external variables are bound. <p> Finally, note that in deferred binding mode, any error condition specified to throw an exception during the <code>bindXXX()</code> methods, may as well be thrown later during the query's evaluation. <p> Example - in case of an immediate binding mode, bindings stay active over executions <pre> // BINDING_MODE_IMMEDIATE is the default, no need to change it QName v = new QName(v); XQPreparedExpression e = c.prepareExpression("declare variable $v external; $v"); e.bindInt(v, 1) // successful execution e.executeQuery(); // successful execution e.executeQuery(); </pre> <br> <br> Example - in case of a deferred binding mode, bindings are only valid for a single execution <pre> // BINDING_MODE_IMMEDIATE is the default, change it to // BINDING_MODE_DEFERRED XQStaticContext cntxt = c.getStaticContext(); cntxt.setBindingMode(XQConstants.BINDING_MODE_DEFERRED); c.setStaticContext(cntxt); QName v = new QName(v); XQPreparedExpression e = c.prepareExpression("declare variable $v external; $v"); e.bindInt(v, 1) // successful execution XQSequence s = e.executeQuery(); while (s.next()) System.out.println(s.getInt()); // an error is reported during the next query // evaluation as not all external variables are bound s = e.executeQuery(); while (s.next()) System.out.println(s.getInt()); </pre> <P> <P> <HR> <P> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindAtomicValue(javax.xml.namespace.QName, java.lang.String, javax.xml.xquery.XQItemType)">bindAtomicValue</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type)</CODE> <BR> Binds a value to the given external variable or the context item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindBoolean(javax.xml.namespace.QName, boolean, javax.xml.xquery.XQItemType)">bindBoolean</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, boolean value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type)</CODE> <BR> Binds a value to the given external variable or the context item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindByte(javax.xml.namespace.QName, byte, javax.xml.xquery.XQItemType)">bindByte</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, byte value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type)</CODE> <BR> Binds a value to the given external variable or the context item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindDocument(javax.xml.namespace.QName, java.io.InputStream, java.lang.String, javax.xml.xquery.XQItemType)">bindDocument</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, <A HREF="http://download.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> value, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> baseURI, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type)</CODE> <BR> Binds a value to the given external variable or the context item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindDocument(javax.xml.namespace.QName, java.io.Reader, java.lang.String, javax.xml.xquery.XQItemType)">bindDocument</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, <A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A> value, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> baseURI, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type)</CODE> <BR> Binds a value to the given external variable or the context item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindDocument(javax.xml.namespace.QName, javax.xml.transform.Source, javax.xml.xquery.XQItemType)">bindDocument</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, <A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/Source.html?is-external=true" title="class or interface in javax.xml.transform">Source</A> value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type)</CODE> <BR> Binds a value to the given external variable or the context item from the given <code>Source</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindDocument(javax.xml.namespace.QName, java.lang.String, java.lang.String, javax.xml.xquery.XQItemType)">bindDocument</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> value, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> baseURI, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type)</CODE> <BR> Binds a value to the given external variable or the context item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindDocument(javax.xml.namespace.QName, javax.xml.stream.XMLStreamReader, javax.xml.xquery.XQItemType)">bindDocument</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, <A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/stream/XMLStreamReader.html?is-external=true" title="class or interface in javax.xml.stream">XMLStreamReader</A> value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type)</CODE> <BR> Binds a value to the given external variable or the context item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindDouble(javax.xml.namespace.QName, double, javax.xml.xquery.XQItemType)">bindDouble</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, double value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type)</CODE> <BR> Binds a value to the given external variable or the context item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindFloat(javax.xml.namespace.QName, float, javax.xml.xquery.XQItemType)">bindFloat</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, float value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type)</CODE> <BR> Binds a value to the given external variable or the context item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindInt(javax.xml.namespace.QName, int, javax.xml.xquery.XQItemType)">bindInt</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, int value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type)</CODE> <BR> Binds a value to the given external variable or the context item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindItem(javax.xml.namespace.QName, javax.xml.xquery.XQItem)">bindItem</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, <A HREF="../../../javax/xml/xquery/XQItem.html" title="interface in javax.xml.xquery">XQItem</A> value)</CODE> <BR> Binds a value to the given external variable.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindLong(javax.xml.namespace.QName, long, javax.xml.xquery.XQItemType)">bindLong</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, long value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type)</CODE> <BR> Binds a value to the given external variable or the context item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindNode(javax.xml.namespace.QName, org.w3c.dom.Node, javax.xml.xquery.XQItemType)">bindNode</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, <A HREF="http://download.oracle.com/javase/6/docs/api/org/w3c/dom/Node.html?is-external=true" title="class or interface in org.w3c.dom">Node</A> value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type)</CODE> <BR> Binds a value to the given external variable or the context item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindObject(javax.xml.namespace.QName, java.lang.Object, javax.xml.xquery.XQItemType)">bindObject</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type)</CODE> <BR> Binds a value to the given external variable or the context item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindSequence(javax.xml.namespace.QName, javax.xml.xquery.XQSequence)">bindSequence</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, <A HREF="../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A> value)</CODE> <BR> Binds a value to the given external variable or the context item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindShort(javax.xml.namespace.QName, short, javax.xml.xquery.XQItemType)">bindShort</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, short value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type)</CODE> <BR> Binds a value to the given external variable or the context item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQDynamicContext.html#bindString(javax.xml.namespace.QName, java.lang.String, javax.xml.xquery.XQItemType)">bindString</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type)</CODE> <BR> Binds a value to the given external variable or the context item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util">TimeZone</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQDynamicContext.html#getImplicitTimeZone()">getImplicitTimeZone</A></B>()</CODE> <BR> Gets the implicit timezone</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQDynamicContext.html#setImplicitTimeZone(java.util.TimeZone)">setImplicitTimeZone</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util">TimeZone</A> implicitTimeZone)</CODE> <BR> Sets the implicit timezone</TD> </TR> </TABLE> <P> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="getImplicitTimeZone()"><!-- --></A><H3> getImplicitTimeZone</H3> <PRE> <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util">TimeZone</A> <B>getImplicitTimeZone</B>() throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Gets the implicit timezone <P> <DD><DL> <DT><B>Returns:</B><DD>the implicit timezone. This may have been set by an application using the <code>setImplicitTimeZone</code> method or provided by the implementation <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if the expression is in a closed state</DL> </DD> </DL> <HR> <A NAME="bindAtomicValue(javax.xml.namespace.QName, java.lang.String, javax.xml.xquery.XQItemType)"><!-- --></A><H3> bindAtomicValue</H3> <PRE> void <B>bindAtomicValue</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Binds a value to the given external variable or the context item. The value is converted into an instance of the specified type according to the casting from <code>xs:string</code> rules outlined in <a href="http://www.w3.org/TR/xpath-functions/#casting-from-strings"> <i>17.1.1 Casting from xs:string and xs:untypedAtomic, XQuery 1.0 and XPath 2.0 Functions and Operators</i></a>. If the cast fails, or if there is a mismatch between the static and dynamic types, an <code>XQException</code> is thrown either by this method or during query evaluation. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>varName</CODE> - the name of the external variable to bind to<DD><CODE>value</CODE> - the lexical string value of the type<DD><CODE>type</CODE> - the item type of the bind <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) any of the arguments are <code>null</code>, (2) given type is not an atomic type, (3) the conversion of the value to an XDM instance failed, (4) in case of an <code>XQPreparedExpression</code>, the dynamic type of the bound value is not compatible with the static type of the variable, (5) in case of an <code>XQPreparedExpression</code>, the variable is not defined in the prolog of the expression, or (6) the expression is in a closed state</DL> </DD> </DL> <HR> <A NAME="bindString(javax.xml.namespace.QName, java.lang.String, javax.xml.xquery.XQItemType)"><!-- --></A><H3> bindString</H3> <PRE> void <B>bindString</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Binds a value to the given external variable or the context item. The value is converted into an instance of the specified type, which must represent an <code>xs:string</code> or a type derived by restriction from <code>xs:string</code>. If the specified type is <code>null</code>, it defaults to <code>xs:string</code>.<br> Subsequently the value is converted into an instance of the specified type according to the rule defined in <i>14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0,</i>. If the conversion fails, or if there is a mismatch between the static and dynamic types, an <code>XQException</code> is raised either by this method, or during query evaluation. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>varName</CODE> - the name of the external variable to bind to, cannot be <code>null</code><DD><CODE>value</CODE> - the value to be converted, cannot be <code>null</code><DD><CODE>type</CODE> - the type of the value to be bound to the external variable. The default type, <code>xs:string</code>, is used in case <code>null</code> is specified <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the <code>varName</code> or <code>value</code> argument is <code>null</code>, (2) the conversion of the value to an XDM instance failed, (3) in case of an <code>XQPreparedExpression</code>, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an <code>XQPreparedExpression</code>, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state</DL> </DD> </DL> <HR> <A NAME="bindDocument(javax.xml.namespace.QName, java.lang.String, java.lang.String, javax.xml.xquery.XQItemType)"><!-- --></A><H3> bindDocument</H3> <PRE> void <B>bindDocument</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> value, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> baseURI, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Binds a value to the given external variable or the context item. <br> <br> If the value represents a well-formed XML document, it will be parsed and results in a document node. The kind of the input type must be <code>null</code>, <code>XQITEMKIND_DOCUMENT_ELEMENT</code>, or <code>XQITEMKIND_DOCUMENT_SCHEMA_ELEMENT</code>. <br> <br> The value is converted into an instance of the specified type according to the rules defined in <i>14.3 Mapping a Java XML document to an XQuery document node, XQuery API for Java (XQJ) 1.0</i>. <br> <br> If the conversion fails, or if there is a mismatch between the static and dynamic types, an <code>XQException</code> is raised either by this method, or during query evaluation. If the value is not well formed, or if a kind of the input type other than the values list above is specified, behavior is implementation defined and may raise an exception. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>varName</CODE> - the name of the external variable to bind to, cannot be <code>null</code><DD><CODE>value</CODE> - the value to be converted, cannot be <code>null</code><DD><CODE>baseURI</CODE> - an optional base URI, can be <code>null</code>. It can be used, for example, to resolve relative URIs and to include in error messages.<DD><CODE>type</CODE> - the type of the value for the created document node. If <code>null</code> is specified, it behaves as if <code>XQDataFactory.createDocumentElementType( XQDataFactory.createElementType(null, XQItemType.XQBASETYPE_XS_UNTYPED))</code> were passed in as the type parameter. That is, the type represents the XQuery sequence type <code>document-node(element(*, xs:untyped))</code> <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the <code>varName</code> or <code>value</code> argument is <code>null</code>, (2) the conversion of the value to an XDM instance failed, (3) in case of an <code>XQPreparedExpression</code>, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an <code>XQPreparedExpression</code>, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state</DL> </DD> </DL> <HR> <A NAME="bindDocument(javax.xml.namespace.QName, java.io.Reader, java.lang.String, javax.xml.xquery.XQItemType)"><!-- --></A><H3> bindDocument</H3> <PRE> void <B>bindDocument</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, <A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A> value, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> baseURI, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Binds a value to the given external variable or the context item. <br> <br> If the value represents a well-formed XML document, it will be parsed and results in a document node. The kind of the input type must be <code>null</code>, <code>XQITEMKIND_DOCUMENT_ELEMENT</code>, or <code>XQITEMKIND_DOCUMENT_SCHEMA_ELEMENT</code>. <br> <br> The value is converted into an instance of the specified type according to the rules defined in <i>14.3 Mapping a Java XML document to an XQuery document node, XQuery API for Java (XQJ) 1.0</i>. <br> <br> If the conversion fails, or if there is a mismatch between the static and dynamic types, an <code>XQException</code> is raised either by this method, or during query evaluation. If the value is not well formed, or if a kind of the input type other than the values list above is specified, behavior is implementation defined and may raise an exception. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>varName</CODE> - the name of the external variable to bind to, cannot be <code>null</code><DD><CODE>value</CODE> - the value to be converted, cannot be <code>null</code><DD><CODE>baseURI</CODE> - an optional base URI, can be <code>null</code>. It can be used, for example, to resolve relative URIs and to include in error messages.<DD><CODE>type</CODE> - the type of the value for the created document node. If <code>null</code> is specified, it behaves as if <code>XQDataFactory.createDocumentElementType( XQDataFactory.createElementType(null, XQItemType.XQBASETYPE_XS_UNTYPED))</code> were passed in as the type parameter. That is, the type represents the XQuery sequence type <code>document-node(element(*, xs:untyped))</code> <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the <code>varName</code> or <code>value</code> argument is <code>null</code>, (2) the conversion of the value to an XDM instance failed, (3) in case of an <code>XQPreparedExpression</code>, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an <code>XQPreparedExpression</code>, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state</DL> </DD> </DL> <HR> <A NAME="bindDocument(javax.xml.namespace.QName, java.io.InputStream, java.lang.String, javax.xml.xquery.XQItemType)"><!-- --></A><H3> bindDocument</H3> <PRE> void <B>bindDocument</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, <A HREF="http://download.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> value, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> baseURI, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Binds a value to the given external variable or the context item. <br> <br> If the value represents a well-formed XML document, it will be parsed and results in a document node. The kind of the input type must be <code>null</code>, <code>XQITEMKIND_DOCUMENT_ELEMENT</code>, or <code>XQITEMKIND_DOCUMENT_SCHEMA_ELEMENT</code>. <br> <br> The value is converted into an instance of the specified type according to the rules defined in <i>14.3 Mapping a Java XML document to an XQuery document node, XQuery API for Java (XQJ) 1.0</i>. <br> <br> If the conversion fails, or if there is a mismatch between the static and dynamic types, an <code>XQException</code> is raised either by this method, or during query evaluation. If the value is not well formed, or if a kind of the input type other than the values list above is specified, behavior is implementation defined and may raise an exception. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>varName</CODE> - the name of the external variable to bind to, cannot be <code>null</code><DD><CODE>value</CODE> - the value to be converted, cannot be <code>null</code><DD><CODE>baseURI</CODE> - an optional base URI, can be <code>null</code>. It can be used, for example, to resolve relative URIs and to include in error messages.<DD><CODE>type</CODE> - the type of the value for the created document node. If <code>null</code> is specified, it behaves as if <code>XQDataFactory.createDocumentElementType( XQDataFactory.createElementType(null, XQItemType.XQBASETYPE_XS_UNTYPED))</code> were passed in as the type parameter. That is, the type represents the XQuery sequence type <code>document-node(element(*, xs:untyped))</code> <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the <code>varName</code> or <code>value</code> argument is <code>null</code>, (2) the conversion of the value to an XDM instance failed, (3) in case of an <code>XQPreparedExpression</code>, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an <code>XQPreparedExpression</code>, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state</DL> </DD> </DL> <HR> <A NAME="bindDocument(javax.xml.namespace.QName, javax.xml.stream.XMLStreamReader, javax.xml.xquery.XQItemType)"><!-- --></A><H3> bindDocument</H3> <PRE> void <B>bindDocument</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, <A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/stream/XMLStreamReader.html?is-external=true" title="class or interface in javax.xml.stream">XMLStreamReader</A> value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Binds a value to the given external variable or the context item. <br> <br> If the value represents a well-formed XML document, it results in a document node. The kind of the input type must be <code>null</code>, <code>XQITEMKIND_DOCUMENT_ELEMENT</code> or <code>XQITEMKIND_DOCUMENT_SCHEMA_ELEMENT</code>. <br> <br> The value is converted into an instance of the specified type according to the rules defined in <i>14.3 Mapping a Java XML document to an XQuery document node, XQuery API for Java (XQJ) 1.0</i>. <br> <br> If the value is not well formed, or if a kind of the input type other than the values list above is specified, behavior is implementation defined and may raise an exception. If the conversion fails, or if there is a mismatch between the static and dynamic types, an <code>XQException</code> is raised either by this method, or during query evaluation. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>varName</CODE> - the name of the external variable to bind to, cannot be <code>null</code><DD><CODE>value</CODE> - the value to be converted, cannot be <code>null</code><DD><CODE>type</CODE> - the type of the value for the created document node. If <code>null</code> is specified, it behaves as if <code>XQDataFactory.createDocumentElementType( XQDataFactory.createElementType(null, XQItemType.XQBASETYPE_XS_UNTYPED))</code> were passed in as the type parameter. That is, the type represents the XQuery sequence type <code>document-node(element(*, xs:untyped))</code> <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the <code>varName</code> or <code>value</code> argument is <code>null</code>, (2) the conversion of the value to an XDM instance failed, (3) in case of an <code>XQPreparedExpression</code>, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an <code>XQPreparedExpression</code>, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state</DL> </DD> </DL> <HR> <A NAME="bindDocument(javax.xml.namespace.QName, javax.xml.transform.Source, javax.xml.xquery.XQItemType)"><!-- --></A><H3> bindDocument</H3> <PRE> void <B>bindDocument</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, <A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/Source.html?is-external=true" title="class or interface in javax.xml.transform">Source</A> value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Binds a value to the given external variable or the context item from the given <code>Source</code>. An XQJ implementation must at least support the following implementations: <ul> <li><code>javax.xml.transform.dom.DOMSource</code></li> <li><code>javax.xml.transform.sax.SAXSource</code></li> <li><code>javax.xml.transform.stream.StreamSource</code></li> </ul> <br> <br> If the value represents a well-formed XML document, it will result in a document node. The kind of the input type must be <code>null</code>, <code>XQITEMKIND_DOCUMENT_ELEMENT</code>, or <code>XQITEMKIND_DOCUMENT_SCHEMA_ELEMENT</code>. <br> <br> The value is converted into an instance of the specified type according to the rules defined in <i>14.3 Mapping a Java XML document to an XQuery document node, XQuery API for Java (XQJ) 1.0</i>. <br> <br> If the value is not well formed, or if a kind of the input type other than the values list above is specified, behavior is implementation defined and may raise an exception. If the conversion fails, or if there is a mismatch between the static and dynamic types, an <code>XQException</code> is raised either by this method, or during query evaluation. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>varName</CODE> - the name of the external variable to bind to, cannot be <code>null</code><DD><CODE>value</CODE> - the value to be converted, cannot be <code>null</code><DD><CODE>type</CODE> - the type of the value for the created document node. If <code>null</code> is specified, it behaves as if <code>XQDataFactory.createDocumentElementType( XQDataFactory.createElementType(null, XQItemType.XQBASETYPE_XS_UNTYPED))</code> were passed in as the type parameter. That is, the type represents the XQuery sequence type <code>document-node(element(*, xs:untyped))</code> <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the <code>varName</code> or <code>value</code> argument is <code>null</code>, (2) the conversion of the value to an XDM instance failed, (3) in case of an <code>XQPreparedExpression</code>, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an <code>XQPreparedExpression</code>, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state</DL> </DD> </DL> <HR> <A NAME="setImplicitTimeZone(java.util.TimeZone)"><!-- --></A><H3> setImplicitTimeZone</H3> <PRE> void <B>setImplicitTimeZone</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util">TimeZone</A> implicitTimeZone) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Sets the implicit timezone <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>implicitTimeZone</CODE> - time zone to be set <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if the expression is in a closed state</DL> </DD> </DL> <HR> <A NAME="bindItem(javax.xml.namespace.QName, javax.xml.xquery.XQItem)"><!-- --></A><H3> bindItem</H3> <PRE> void <B>bindItem</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, <A HREF="../../../javax/xml/xquery/XQItem.html" title="interface in javax.xml.xquery">XQItem</A> value) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Binds a value to the given external variable. The dynamic type of the value is derived from the <code>XQItem</code>. In case of a mismatch between the static and dynamic types, an <code>XQException</code> is raised either by this method, or during query evaluation. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>varName</CODE> - the name of the external variable to bind to, cannot be <code>null</code><DD><CODE>value</CODE> - the value to be bound, cannot be <code>null</code> <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) any of the arguments are <code>null</code>, (2) in case of an <code>XQPreparedExpression</code>, the dynamic type of the bound value is not compatible with the static type of the variable, (3) in case of an <code>XQPreparedExpression</code>, the variable is not defined in the prolog of the expression, (4) the expression is in a closed state, or (5) the specified item is closed</DL> </DD> </DL> <HR> <A NAME="bindSequence(javax.xml.namespace.QName, javax.xml.xquery.XQSequence)"><!-- --></A><H3> bindSequence</H3> <PRE> void <B>bindSequence</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, <A HREF="../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A> value) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Binds a value to the given external variable or the context item. The input sequence is consumed from its current position to the end, after which the input sequence's position will be set to point after the last item. The dynamic type of the value is derived from the items in the sequence. In case of a mismatch between the static and dynamic types, an <code>XQException</code> is be raised either by this method, or during query evaluation. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>varName</CODE> - the name of the external variable to bind to, cannot be <code>null</code><DD><CODE>value</CODE> - the value to be bound, cannot be <code>null</code> <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) any of the arguments are <code>null</code>, (2) in case of an <code>XQPreparedExpression</code>, the dynamic type of the bound value is not compatible with the static type of the variable, (3) in case of an <code>XQPreparedExpression</code>, the variable is not defined in the prolog of the expression, (4) the expression is in a closed state, or (5) the specified sequence is closed</DL> </DD> </DL> <HR> <A NAME="bindObject(javax.xml.namespace.QName, java.lang.Object, javax.xml.xquery.XQItemType)"><!-- --></A><H3> bindObject</H3> <PRE> void <B>bindObject</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Binds a value to the given external variable or the context item. The value is converted into an instance of the specified type according to the rule defined in <i>14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0</i>. If the conversion fails, or if there is a mismatch between the static and dynamic types, an <code>XQException</code> is raised either by this method, or during query evaluation. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>varName</CODE> - the name of the external variable to bind to, cannot be <code>null</code><DD><CODE>value</CODE> - the value to be converted, cannot be <code>null</code><DD><CODE>type</CODE> - the type of the value to be bound to the external variable. The default type of the value is used in case <code>null</code> is specified <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the <code>varName</code> or <code>value</code> argument is <code>null</code>, (2) the conversion of the value to an XDM instance failed, (3) in case of an <code>XQPreparedExpression</code>, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an <code>XQPreparedExpression</code>, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state</DL> </DD> </DL> <HR> <A NAME="bindBoolean(javax.xml.namespace.QName, boolean, javax.xml.xquery.XQItemType)"><!-- --></A><H3> bindBoolean</H3> <PRE> void <B>bindBoolean</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, boolean value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Binds a value to the given external variable or the context item. The value is converted into an instance of the specified type according to the rule defined in <i>14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0</i>. If the conversion fails, or if there is a mismatch between the static and dynamic types, an <code>XQException</code> is raised either by this method, or during query evaluation. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>varName</CODE> - the name of the external variable to bind to, cannot be <code>null</code><DD><CODE>value</CODE> - the value to be converted<DD><CODE>type</CODE> - the type of the value to be bound to the external variable. The default type of the value is used in case <code>null</code> is specified <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the <code>varName</code> argument is <code>null</code>, (2) the conversion of the value to an XDM instance failed, (3) in case of an <code>XQPreparedExpression</code>, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an <code>XQPreparedExpression</code>, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state</DL> </DD> </DL> <HR> <A NAME="bindByte(javax.xml.namespace.QName, byte, javax.xml.xquery.XQItemType)"><!-- --></A><H3> bindByte</H3> <PRE> void <B>bindByte</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, byte value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Binds a value to the given external variable or the context item. The value is converted into an instance of the specified type according to the rule defined in <i>14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0</i>. If the conversion fails, or if there is a mismatch between the static and dynamic types, an <code>XQException</code> is raised either by this method, or during query evaluation. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>varName</CODE> - the name of the external variable to bind to, cannot be <code>null</code><DD><CODE>value</CODE> - the value to be converted<DD><CODE>type</CODE> - the type of the value to be bound to the external variable. The default type of the value is used in case <code>null</code> is specified <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the <code>varName</code> argument is <code>null</code>, (2) the conversion of the value to an XDM instance failed, (3) in case of an <code>XQPreparedExpression</code>, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an <code>XQPreparedExpression</code>, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state</DL> </DD> </DL> <HR> <A NAME="bindDouble(javax.xml.namespace.QName, double, javax.xml.xquery.XQItemType)"><!-- --></A><H3> bindDouble</H3> <PRE> void <B>bindDouble</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, double value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Binds a value to the given external variable or the context item. The value is converted into an instance of the specified type according to the rule defined in <i>14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0</i>. If the conversion fails, or if there is a mismatch between the static and dynamic types, an <code>XQException</code> is raised either by this method, or during query evaluations. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>varName</CODE> - the name of the external variable to bind to, cannot be <code>null</code><DD><CODE>value</CODE> - the value to be converted<DD><CODE>type</CODE> - the type of the value to be bound to the external variable. The default type of the value is used in case <code>null</code> is specified <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the <code>varName</code> argument is <code>null</code>, (2) the conversion of the value to an XDM instance failed, (3) in case of an <code>XQPreparedExpression</code>, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an <code>XQPreparedExpression</code>, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state</DL> </DD> </DL> <HR> <A NAME="bindFloat(javax.xml.namespace.QName, float, javax.xml.xquery.XQItemType)"><!-- --></A><H3> bindFloat</H3> <PRE> void <B>bindFloat</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, float value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Binds a value to the given external variable or the context item. The value is converted into an instance of the specified type according to the rule defined in <i>14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0</i>. If the conversion fails, or if there is a mismatch between the static and dynamic types, an <code>XQException</code> is raised either by this method, or during query evaluations. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>varName</CODE> - the name of the external variable to bind to, cannot be <code>null</code><DD><CODE>value</CODE> - the value to be converted<DD><CODE>type</CODE> - the type of the value to be bound to the external variable. The default type of the value is used in case <code>null</code> is specified <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the <code>varName</code> argument is <code>null</code>, (2) the conversion of the value to an XDM instance failed, (3) in case of an <code>XQPreparedExpression</code>, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an <code>XQPreparedExpression</code>, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state</DL> </DD> </DL> <HR> <A NAME="bindInt(javax.xml.namespace.QName, int, javax.xml.xquery.XQItemType)"><!-- --></A><H3> bindInt</H3> <PRE> void <B>bindInt</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, int value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Binds a value to the given external variable or the context item. The value is converted into an instance of the specified type according to the rule defined in <i>14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0</i>. If the conversion fails, or if there is a mismatch between the static and dynamic types, an <code>XQException</code> is raised either by this method, or during query evaluations. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>varName</CODE> - the name of the external variable to bind to, cannot be <code>null</code><DD><CODE>value</CODE> - the value to be converted<DD><CODE>type</CODE> - the type of the value to be bound to the external variable. The default type of the value is used in case <code>null</code> is specified <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the <code>varName</code> argument is <code>null</code>, (2) the conversion of the value to an XDM instance failed, (3) in case of an <code>XQPreparedExpression</code>, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an <code>XQPreparedExpression</code>, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state</DL> </DD> </DL> <HR> <A NAME="bindLong(javax.xml.namespace.QName, long, javax.xml.xquery.XQItemType)"><!-- --></A><H3> bindLong</H3> <PRE> void <B>bindLong</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, long value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Binds a value to the given external variable or the context item. The value is converted into an instance of the specified type according to the rule defined in <i>14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0</i>. If the conversion fails, or if there is a mismatch between the static and dynamic types, an <code>XQException</code> is raised either by this method, or during query evaluation. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>varName</CODE> - the name of the external variable to bind to, cannot be <code>null</code><DD><CODE>value</CODE> - the value to be converted<DD><CODE>type</CODE> - the type of the value to be bound to the external variable. The default type of the value is used in case <code>null</code> is specified <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the <code>varName</code> argument is <code>null</code>, (2) the conversion of the value to an XDM instance failed, (3) in case of an <code>XQPreparedExpression</code>, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an <code>XQPreparedExpression</code>, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state</DL> </DD> </DL> <HR> <A NAME="bindNode(javax.xml.namespace.QName, org.w3c.dom.Node, javax.xml.xquery.XQItemType)"><!-- --></A><H3> bindNode</H3> <PRE> void <B>bindNode</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, <A HREF="http://download.oracle.com/javase/6/docs/api/org/w3c/dom/Node.html?is-external=true" title="class or interface in org.w3c.dom">Node</A> value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Binds a value to the given external variable or the context item. The value is converted into an instance of the specified type according to the rule defined in <i>14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0</i>. If the conversion fails, or if there is a mismatch between the static and dynamic types, an <code>XQException</code> is raised either by this method, or during query evaluation. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>varName</CODE> - the name of the external variable to bind to, cannot be <code>null</code><DD><CODE>value</CODE> - the value to be converted, cannot be <code>null</code><DD><CODE>type</CODE> - the type of the value to be bound to the external variable. The default type of the value is used in case <code>null</code> is specified <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the <code>varName</code> or <code>value</code> argument is <code>null</code>, (2) the conversion of the value to an XDM instance failed, (3) in case of an <code>XQPreparedExpression</code>, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an <code>XQPreparedExpression</code>, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state</DL> </DD> </DL> <HR> <A NAME="bindShort(javax.xml.namespace.QName, short, javax.xml.xquery.XQItemType)"><!-- --></A><H3> bindShort</H3> <PRE> void <B>bindShort</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/QName.html?is-external=true" title="class or interface in javax.xml.namespace">QName</A> varName, short value, <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> type) throws <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></PRE> <DL> <DD>Binds a value to the given external variable or the context item. The value is converted into an instance of the specified type according to the rule defined in <i>14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0</i>. If the conversion fails, or if there is a mismatch between the static and dynamic types, an <code>XQException</code> is raised either by this method, or during query evaluation. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>varName</CODE> - the name of the external variable to bind to, cannot be <code>null</code><DD><CODE>value</CODE> - the value to be converted<DD><CODE>type</CODE> - the type of the value to be bound to the external variable. The default type of the value is used in case <code>null</code> is specified <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></CODE> - if (1) the <code>varName</code> argument is <code>null</code>, (2) the conversion of the value to an XDM instance failed, (3) in case of an <code>XQPreparedExpression</code>, the dynamic type of the bound value is not compatible with the static type of the variable, (4) in case of an <code>XQPreparedExpression</code>, the variable is not defined in the prolog of the expression, or (5) if the expression is in a closed state</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/xml/xquery/XQDataSource.html" title="interface in javax.xml.xquery"><B>PREV CLASS</B></A> <A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?javax/xml/xquery/XQDynamicContext.html" target="_top"><B>FRAMES</B></A> <A HREF="XQDynamicContext.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> Copyright (c) 2004-2011 Saxonica Limited. All rights reserved. </BODY> </HTML>