Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > b3bdfe6d859a3d6920ff2c44b38e9a6f > files > 2405

saxon-manual-9.4.0.9-2.mga7.noarch.rpm

<!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:25 GMT 2011 -->
<TITLE>
XQueryExpression
</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="XQueryExpression";
    }
}
</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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../net/sf/saxon/query/UpdateAgent.html" title="interface in net.sf.saxon.query"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../net/sf/saxon/query/XQueryFunction.html" title="class in net.sf.saxon.query"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?net/sf/saxon/query/XQueryExpression.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="XQueryExpression.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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">
net.sf.saxon.query</FONT>
<BR>
Class XQueryExpression</H2>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>net.sf.saxon.query.XQueryExpression</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/SourceLocator.html?is-external=true" title="class or interface in javax.xml.transform">SourceLocator</A>, <A HREF="../../../../net/sf/saxon/expr/Container.html" title="interface in net.sf.saxon.expr">Container</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>XQueryExpression</B><DT>extends <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><DT>implements <A HREF="../../../../net/sf/saxon/expr/Container.html" title="interface in net.sf.saxon.expr">Container</A></DL>
</PRE>

<P>
XQueryExpression represents a compiled query. This object is immutable and thread-safe,
 the same compiled query may be executed many times in series or in parallel. The object
 can be created only by using the compileQuery method of the QueryProcessor class.
 <p/>
 <p>Various methods are provided for evaluating the query, with different options for
 delivery of the results.</p>
<P>

<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#net.sf.saxon.query.XQueryExpression">Serialized Form</A></DL>
<HR>

<P>

<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_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>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#XQueryExpression(net.sf.saxon.expr.Expression, net.sf.saxon.expr.instruct.Executable, net.sf.saxon.query.QueryModule, net.sf.saxon.Configuration)">XQueryExpression</A></B>(<A HREF="../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;exp,
                 <A HREF="../../../../net/sf/saxon/expr/instruct/Executable.html" title="class in net.sf.saxon.expr.instruct">Executable</A>&nbsp;exec,
                 <A HREF="../../../../net/sf/saxon/query/QueryModule.html" title="class in net.sf.saxon.query">QueryModule</A>&nbsp;mainModule,
                 <A HREF="../../../../net/sf/saxon/Configuration.html" title="class in net.sf.saxon">Configuration</A>&nbsp;config)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The constructor is protected, to ensure that instances can only be
 created using the compileQuery() methods of StaticQueryContext</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== 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>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#evaluate(net.sf.saxon.query.DynamicQueryContext)">evaluate</A></B>(<A HREF="../../../../net/sf/saxon/query/DynamicQueryContext.html" title="class in net.sf.saxon.query">DynamicQueryContext</A>&nbsp;env)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Execute a the compiled Query, returning the results as a List.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#evaluateSingle(net.sf.saxon.query.DynamicQueryContext)">evaluateSingle</A></B>(<A HREF="../../../../net/sf/saxon/query/DynamicQueryContext.html" title="class in net.sf.saxon.query">DynamicQueryContext</A>&nbsp;env)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Execute the compiled Query, returning the first item in the result.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#explain(net.sf.saxon.trace.ExpressionPresenter)">explain</A></B>(<A HREF="../../../../net/sf/saxon/trace/ExpressionPresenter.html" title="class in net.sf.saxon.trace">ExpressionPresenter</A>&nbsp;out)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Diagnostic method: display a representation of the compiled query on the
 selected output stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#getColumnNumber()">getColumnNumber</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the character position where the current document event ends.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#getContainerGranularity()">getContainerGranularity</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the granularity of the container.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../net/sf/saxon/expr/instruct/Executable.html" title="class in net.sf.saxon.expr.instruct">Executable</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#getExecutable()">getExecutable</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the Executable (representing a complete stylesheet or query) of which this Container forms part</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#getExpression()">getExpression</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the expression wrapped in this XQueryExpression object</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../net/sf/saxon/om/StructuredQName.html" title="class in net.sf.saxon.om">StructuredQName</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#getExternalVariableNames()">getExternalVariableNames</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a list containing the names of the external variables in the query.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#getHostLanguage()">getHostLanguage</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the host language (XSLT, XQuery, XPath) used to implement the code in this container</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#getLineNumber()">getLineNumber</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the line number where the current document event ends.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../net/sf/saxon/event/LocationProvider.html" title="interface in net.sf.saxon.event">LocationProvider</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#getLocationProvider()">getLocationProvider</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the LocationProvider allowing location identifiers to be resolved.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../net/sf/saxon/expr/parser/PathMap.html" title="class in net.sf.saxon.expr.parser">PathMap</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#getPathMap()">getPathMap</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the path map for the query expression</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#getPublicId()">getPublicId</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the public identifier for the current document event.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../net/sf/saxon/expr/instruct/SlotManager.html" title="class in net.sf.saxon.expr.instruct">SlotManager</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#getStackFrameMap()">getStackFrameMap</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the stack frame map used for the outermost level of this query</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../net/sf/saxon/query/QueryModule.html" title="class in net.sf.saxon.query">QueryModule</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#getStaticContext()">getStaticContext</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the static context in which this expression was compiled.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#getSystemId()">getSystemId</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the system identifier for the current document event.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#isDocumentProjectionAllowed()">isDocumentProjectionAllowed</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ask whether document projection is allowed</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#isUpdateQuery()">isUpdateQuery</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ask whether this is an update query</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../net/sf/saxon/evpull/EventIterator.html" title="interface in net.sf.saxon.evpull">EventIterator</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#iterateEvents(net.sf.saxon.Controller, net.sf.saxon.query.DynamicQueryContext)">iterateEvents</A></B>(<A HREF="../../../../net/sf/saxon/Controller.html" title="class in net.sf.saxon">Controller</A>&nbsp;controller,
              <A HREF="../../../../net/sf/saxon/query/DynamicQueryContext.html" title="class in net.sf.saxon.query">DynamicQueryContext</A>&nbsp;dynamicEnv)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Run the query returning the results as an EventIterator</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../net/sf/saxon/om/SequenceIterator.html" title="interface in net.sf.saxon.om">SequenceIterator</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#iterator(net.sf.saxon.query.DynamicQueryContext)">iterator</A></B>(<A HREF="../../../../net/sf/saxon/query/DynamicQueryContext.html" title="class in net.sf.saxon.query">DynamicQueryContext</A>&nbsp;env)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get an iterator over the results of the expression.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../net/sf/saxon/Controller.html" title="class in net.sf.saxon">Controller</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#newController()">newController</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a controller that can be used to execute functions in this compiled query.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#pull(net.sf.saxon.query.DynamicQueryContext, javax.xml.transform.Result, java.util.Properties)">pull</A></B>(<A HREF="../../../../net/sf/saxon/query/DynamicQueryContext.html" title="class in net.sf.saxon.query">DynamicQueryContext</A>&nbsp;dynamicEnv,
     <A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/Result.html?is-external=true" title="class or interface in javax.xml.transform">Result</A>&nbsp;destination,
     <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;outputProperties)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Run the query in pull mode.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#run(net.sf.saxon.query.DynamicQueryContext, javax.xml.transform.Result, java.util.Properties)">run</A></B>(<A HREF="../../../../net/sf/saxon/query/DynamicQueryContext.html" title="class in net.sf.saxon.query">DynamicQueryContext</A>&nbsp;env,
    <A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/Result.html?is-external=true" title="class or interface in javax.xml.transform">Result</A>&nbsp;result,
    <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;outputProperties)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Run the query, sending the results directly to a JAXP Result object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#runUpdate(net.sf.saxon.query.DynamicQueryContext)">runUpdate</A></B>(<A HREF="../../../../net/sf/saxon/query/DynamicQueryContext.html" title="class in net.sf.saxon.query">DynamicQueryContext</A>&nbsp;dynamicEnv)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Run an updating query</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#runUpdate(net.sf.saxon.query.DynamicQueryContext, net.sf.saxon.query.UpdateAgent)">runUpdate</A></B>(<A HREF="../../../../net/sf/saxon/query/DynamicQueryContext.html" title="class in net.sf.saxon.query">DynamicQueryContext</A>&nbsp;dynamicEnv,
          <A HREF="../../../../net/sf/saxon/query/UpdateAgent.html" title="interface in net.sf.saxon.query">UpdateAgent</A>&nbsp;agent)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Run an updating query, writing back eligible updated node to persistent storage.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#setAllowDocumentProjection(boolean)">setAllowDocumentProjection</A></B>(boolean&nbsp;allowed)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicate that document projection is or is not allowed</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#usesContextItem()">usesContextItem</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ask whether this query uses the context item</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<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></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_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>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="XQueryExpression(net.sf.saxon.expr.Expression, net.sf.saxon.expr.instruct.Executable, net.sf.saxon.query.QueryModule, net.sf.saxon.Configuration)"><!-- --></A><H3>
XQueryExpression</H3>
<PRE>
protected <B>XQueryExpression</B>(<A HREF="../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;exp,
                           <A HREF="../../../../net/sf/saxon/expr/instruct/Executable.html" title="class in net.sf.saxon.expr.instruct">Executable</A>&nbsp;exec,
                           <A HREF="../../../../net/sf/saxon/query/QueryModule.html" title="class in net.sf.saxon.query">QueryModule</A>&nbsp;mainModule,
                           <A HREF="../../../../net/sf/saxon/Configuration.html" title="class in net.sf.saxon">Configuration</A>&nbsp;config)
                    throws <A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>The constructor is protected, to ensure that instances can only be
 created using the compileQuery() methods of StaticQueryContext
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>exp</CODE> - an expression to be wrapped as an XQueryExpression<DD><CODE>exec</CODE> - the executable<DD><CODE>mainModule</CODE> - the static context of the main module<DD><CODE>config</CODE> - the configuration
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE> - if an error occurs</DL>
</DL>

<!-- ============ 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="getExpression()"><!-- --></A><H3>
getExpression</H3>
<PRE>
public <A HREF="../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A> <B>getExpression</B>()</PRE>
<DL>
<DD>Get the expression wrapped in this XQueryExpression object
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the underlying expression</DL>
</DD>
</DL>
<HR>

<A NAME="getContainerGranularity()"><!-- --></A><H3>
getContainerGranularity</H3>
<PRE>
public int <B>getContainerGranularity</B>()</PRE>
<DL>
<DD>Get the granularity of the container.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/sf/saxon/expr/Container.html#getContainerGranularity()">getContainerGranularity</A></CODE> in interface <CODE><A HREF="../../../../net/sf/saxon/expr/Container.html" title="interface in net.sf.saxon.expr">Container</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>0 for a temporary container created during parsing; 1 for a container
         that operates at the level of an XPath expression; 2 for a container at the level
         of a global function or template</DL>
</DD>
</DL>
<HR>

<A NAME="usesContextItem()"><!-- --></A><H3>
usesContextItem</H3>
<PRE>
public boolean <B>usesContextItem</B>()</PRE>
<DL>
<DD>Ask whether this query uses the context item
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>true if the context item is referenced either in the query body or in the initializer
         of any global variable</DL>
</DD>
</DL>
<HR>

<A NAME="isUpdateQuery()"><!-- --></A><H3>
isUpdateQuery</H3>
<PRE>
public boolean <B>isUpdateQuery</B>()</PRE>
<DL>
<DD>Ask whether this is an update query
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>true if the body of the query is an updating expression
         (as defined by the XQuery Update specification). Note that a query can use Update syntax
         (notably the copy-modify syntax) without being an updating expression.</DL>
</DD>
</DL>
<HR>

<A NAME="getStackFrameMap()"><!-- --></A><H3>
getStackFrameMap</H3>
<PRE>
public <A HREF="../../../../net/sf/saxon/expr/instruct/SlotManager.html" title="class in net.sf.saxon.expr.instruct">SlotManager</A> <B>getStackFrameMap</B>()</PRE>
<DL>
<DD>Get the stack frame map used for the outermost level of this query
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the stack frame map</DL>
</DD>
</DL>
<HR>

<A NAME="getStaticContext()"><!-- --></A><H3>
getStaticContext</H3>
<PRE>
public <A HREF="../../../../net/sf/saxon/query/QueryModule.html" title="class in net.sf.saxon.query">QueryModule</A> <B>getStaticContext</B>()</PRE>
<DL>
<DD>Get the static context in which this expression was compiled. This is essentially an internal
 copy of the original user-created StaticQueryContext object, augmented with information obtained
 from the query prolog of the main query module, and with information about functions and variables
 imported from other library modules. The user-created StaticQueryContext object is not modified
 by Saxon, whereas the QueryModule object includes additional information found in the query prolog.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the QueryModule object representing the static context of the main module of the query.
         This is available for inspection, but must not be modified or reused by the application.</DL>
</DD>
</DL>
<HR>

<A NAME="getExternalVariableNames()"><!-- --></A><H3>
getExternalVariableNames</H3>
<PRE>
public <A HREF="../../../../net/sf/saxon/om/StructuredQName.html" title="class in net.sf.saxon.om">StructuredQName</A>[] <B>getExternalVariableNames</B>()</PRE>
<DL>
<DD>Get a list containing the names of the external variables in the query.
 <p/>
 <p><i>Changed in Saxon 9.0 to return an array of StructuredQName objects rather than
 integer fingerprints.</i></p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>an array of StructuredQName objects, representing the names of external variables defined
         in the query</DL>
</DD>
</DL>
<HR>

<A NAME="evaluate(net.sf.saxon.query.DynamicQueryContext)"><!-- --></A><H3>
evaluate</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A> <B>evaluate</B>(<A HREF="../../../../net/sf/saxon/query/DynamicQueryContext.html" title="class in net.sf.saxon.query">DynamicQueryContext</A>&nbsp;env)
              throws <A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>Execute a the compiled Query, returning the results as a List.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>env</CODE> - Provides the dynamic query evaluation context
<DT><B>Returns:</B><DD>The results of the expression, as a List. The List represents the sequence
         of items returned by the expression. Each item in the list will either be an
         object representing a node, or an object representing an atomic value.
         For the types of Java object that may be returned, see the description of the
         <A HREF="../../../../net/sf/saxon/xpath/XPathEvaluator.html#evaluate(java.lang.String, java.lang.Object, javax.xml.namespace.QName)"><CODE>evaluate</CODE></A> method
         of class XPathProcessor
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="evaluateSingle(net.sf.saxon.query.DynamicQueryContext)"><!-- --></A><H3>
evaluateSingle</H3>
<PRE>
public <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> <B>evaluateSingle</B>(<A HREF="../../../../net/sf/saxon/query/DynamicQueryContext.html" title="class in net.sf.saxon.query">DynamicQueryContext</A>&nbsp;env)
                      throws <A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>Execute the compiled Query, returning the first item in the result.
 This is useful where it is known that the expression will only return
 a singleton value (for example, a single node, or a boolean).
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>env</CODE> - Provides the dynamic query evaluation context
<DT><B>Returns:</B><DD>The first item in the sequence returned by the expression. If the expression
         returns an empty sequence, this method returns null. Otherwise, it returns the first
         item in the result sequence, represented as a Java object using the same mapping as for
         the <A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#evaluate(net.sf.saxon.query.DynamicQueryContext)"><CODE>evaluate</CODE></A> method
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="iterator(net.sf.saxon.query.DynamicQueryContext)"><!-- --></A><H3>
iterator</H3>
<PRE>
public <A HREF="../../../../net/sf/saxon/om/SequenceIterator.html" title="interface in net.sf.saxon.om">SequenceIterator</A> <B>iterator</B>(<A HREF="../../../../net/sf/saxon/query/DynamicQueryContext.html" title="class in net.sf.saxon.query">DynamicQueryContext</A>&nbsp;env)
                          throws <A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>Get an iterator over the results of the expression. This returns results without
 any conversion of the returned items to "native" Java classes. The iterator will
 deliver a sequence of Item objects, each item being either a NodeInfo (representing
 a node) or an AtomicValue (representing an atomic value).
 <p/>
 <p>To get the results of the query in the form of an XML document in which each
 item is wrapped by an element indicating its type, use:</p>
 <p/>
 <p><code>QueryResult.wrap(iterator(env))</code></p>
 <p/>
 <p>To serialize the results to a file, use the QueryResult.serialize() method.</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>env</CODE> - Provides the dynamic query evaluation context
<DT><B>Returns:</B><DD>an iterator over the results of the query. The class SequenceIterator
         is modeled on the standard Java Iterator class, but has extra functionality
         and can throw exceptions when errors occur.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE> - if a dynamic error occurs in evaluating the query. Some
                        dynamic errors will not be reported by this method, but will only be reported
                        when the individual items of the result are accessed using the returned iterator.</DL>
</DD>
</DL>
<HR>

<A NAME="run(net.sf.saxon.query.DynamicQueryContext, javax.xml.transform.Result, java.util.Properties)"><!-- --></A><H3>
run</H3>
<PRE>
public void <B>run</B>(<A HREF="../../../../net/sf/saxon/query/DynamicQueryContext.html" title="class in net.sf.saxon.query">DynamicQueryContext</A>&nbsp;env,
                <A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/Result.html?is-external=true" title="class or interface in javax.xml.transform">Result</A>&nbsp;result,
                <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;outputProperties)
         throws <A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>Run the query, sending the results directly to a JAXP Result object. This way of executing
 the query is most efficient in the case of queries that produce a single document (or parentless
 element) as their output, because it avoids constructing the result tree in memory: instead,
 it is piped straight to the serializer.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>env</CODE> - the dynamic query context<DD><CODE>result</CODE> - the destination for the results of the query. The query is effectively wrapped
                         in a document{} constructor, so that the items in the result are concatenated to form a single
                         document; this is then written to the requested Result destination, which may be (for example)
                         a DOMResult, a SAXResult, or a StreamResult<DD><CODE>outputProperties</CODE> - Supplies serialization properties, in JAXP format, if the result is to
                         be serialized. This parameter can be defaulted to null.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE> - if the query fails.</DL>
</DD>
</DL>
<HR>

<A NAME="pull(net.sf.saxon.query.DynamicQueryContext, javax.xml.transform.Result, java.util.Properties)"><!-- --></A><H3>
pull</H3>
<PRE>
public void <B>pull</B>(<A HREF="../../../../net/sf/saxon/query/DynamicQueryContext.html" title="class in net.sf.saxon.query">DynamicQueryContext</A>&nbsp;dynamicEnv,
                 <A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/Result.html?is-external=true" title="class or interface in javax.xml.transform">Result</A>&nbsp;destination,
                 <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</A>&nbsp;outputProperties)
          throws <A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>Run the query in pull mode.
 <p/>
 <p>For maximum effect this method should be used when lazyConstructionMode has been set in the Configuration.</p>
 <p/>
 <p><b>Note: this method usually has very similar performance to the
 <A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#run(net.sf.saxon.query.DynamicQueryContext, javax.xml.transform.Result, java.util.Properties)"><CODE>run(DynamicQueryContext,javax.xml.transform.Result,java.util.Properties)</CODE></A> method (which does
 the same thing), but sometimes it is significantly slower. Therefore, the run() method is preferred.</b></p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dynamicEnv</CODE> - the dynamic context for query evaluation<DD><CODE>destination</CODE> - the destination of the query results<DD><CODE>outputProperties</CODE> - the serialization parameters
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../../net/sf/saxon/Configuration.html#setLazyConstructionMode(boolean)"><CODE>Configuration.setLazyConstructionMode(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="iterateEvents(net.sf.saxon.Controller, net.sf.saxon.query.DynamicQueryContext)"><!-- --></A><H3>
iterateEvents</H3>
<PRE>
public <A HREF="../../../../net/sf/saxon/evpull/EventIterator.html" title="interface in net.sf.saxon.evpull">EventIterator</A> <B>iterateEvents</B>(<A HREF="../../../../net/sf/saxon/Controller.html" title="class in net.sf.saxon">Controller</A>&nbsp;controller,
                                   <A HREF="../../../../net/sf/saxon/query/DynamicQueryContext.html" title="class in net.sf.saxon.query">DynamicQueryContext</A>&nbsp;dynamicEnv)
                            throws <A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>Run the query returning the results as an EventIterator
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>controller</CODE> - The Controller used to run the query<DD><CODE>dynamicEnv</CODE> - the XQuery dynamic context for evaluating the query
<DT><B>Returns:</B><DD>an EventIterator representing the results of the query as a sequence of events
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="runUpdate(net.sf.saxon.query.DynamicQueryContext)"><!-- --></A><H3>
runUpdate</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A> <B>runUpdate</B>(<A HREF="../../../../net/sf/saxon/query/DynamicQueryContext.html" title="class in net.sf.saxon.query">DynamicQueryContext</A>&nbsp;dynamicEnv)
              throws <A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>Run an updating query
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dynamicEnv</CODE> - the dynamic context for query execution
<DT><B>Returns:</B><DD>a set of nodes representing the roots of trees that have been modified as a result
         of executing the update. Note that this method will never modify persistent data on disk; it returns
         the root nodes of the affected documents (which will often be document nodes whose document-uri can
         be ascertained), and it is the caller's responsibility to decide what to do with them.
         <p>On completion of this method it is generally unsafe to rely on the contents or relationships
         of NodeInfo objects that were obtained before the updating query was run. Such objects may or may not
         reflect the results of the update operations. This is especially true in the case of nodes that
         are part of a subtree that has been deleted (detached from its parent). Instead, the new updated
         tree should be accessed by navigation from the root nodes returned by this method.</p>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE> - if evaluation of the update query fails, or it this is not an updating query</DL>
</DD>
</DL>
<HR>

<A NAME="runUpdate(net.sf.saxon.query.DynamicQueryContext, net.sf.saxon.query.UpdateAgent)"><!-- --></A><H3>
runUpdate</H3>
<PRE>
public void <B>runUpdate</B>(<A HREF="../../../../net/sf/saxon/query/DynamicQueryContext.html" title="class in net.sf.saxon.query">DynamicQueryContext</A>&nbsp;dynamicEnv,
                      <A HREF="../../../../net/sf/saxon/query/UpdateAgent.html" title="interface in net.sf.saxon.query">UpdateAgent</A>&nbsp;agent)
               throws <A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>Run an updating query, writing back eligible updated node to persistent storage.

 <p>A node is eligible to be written back to disk if it is present in the document pool,
 which generally means that it was originally read using the doc() or collection() function.</p>

 <p>On completion of this method it is generally unsafe to rely on the contents or relationships
         of NodeInfo objects that were obtained before the updating query was run. Such objects may or may not
         reflect the results of the update operations. This is especially true in the case of nodes that
         are part of a subtree that has been deleted (detached from its parent). Instead, the new updated
         tree should be accessed by navigation from the root nodes returned by this method.</p>

 <p>If one or more eligible updated nodes cannot be written back to disk, perhaps because the URI
 identifies a non-updatable location, then an exception is thrown. In this case it is undefined
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dynamicEnv</CODE> - the dynamic context for query execution
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE> - if evaluation of the update query fails, or it this is not an updating query</DL>
</DD>
</DL>
<HR>

<A NAME="newController()"><!-- --></A><H3>
newController</H3>
<PRE>
public <A HREF="../../../../net/sf/saxon/Controller.html" title="class in net.sf.saxon">Controller</A> <B>newController</B>()</PRE>
<DL>
<DD>Get a controller that can be used to execute functions in this compiled query.
 Functions in the query module can be found using <A HREF="../../../../net/sf/saxon/query/QueryModule.html#getUserDefinedFunction(java.lang.String, java.lang.String, int)"><CODE>QueryModule.getUserDefinedFunction(java.lang.String, java.lang.String, int)</CODE></A>.
 They can then be called directly from the Java application using <A HREF="../../../../net/sf/saxon/expr/instruct/UserFunction.html#call(net.sf.saxon.om.ValueRepresentation[], net.sf.saxon.expr.XPathContextMajor)"><CODE>UserFunction.call(net.sf.saxon.om.ValueRepresentation[], net.sf.saxon.expr.XPathContextMajor)</CODE></A>
 The same Controller can be used for a series of function calls. Note that the Controller should only be used
 in a single thread.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>a newly constructed Controller</DL>
</DD>
</DL>
<HR>

<A NAME="explain(net.sf.saxon.trace.ExpressionPresenter)"><!-- --></A><H3>
explain</H3>
<PRE>
public void <B>explain</B>(<A HREF="../../../../net/sf/saxon/trace/ExpressionPresenter.html" title="class in net.sf.saxon.trace">ExpressionPresenter</A>&nbsp;out)</PRE>
<DL>
<DD>Diagnostic method: display a representation of the compiled query on the
 selected output stream.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>out</CODE> - an ExpressionPresenter to which the XML representation of the compiled query
            will be sent</DL>
</DD>
</DL>
<HR>

<A NAME="getExecutable()"><!-- --></A><H3>
getExecutable</H3>
<PRE>
public <A HREF="../../../../net/sf/saxon/expr/instruct/Executable.html" title="class in net.sf.saxon.expr.instruct">Executable</A> <B>getExecutable</B>()</PRE>
<DL>
<DD>Get the Executable (representing a complete stylesheet or query) of which this Container forms part
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/sf/saxon/expr/Container.html#getExecutable()">getExecutable</A></CODE> in interface <CODE><A HREF="../../../../net/sf/saxon/expr/Container.html" title="interface in net.sf.saxon.expr">Container</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the executable</DL>
</DD>
</DL>
<HR>

<A NAME="getPathMap()"><!-- --></A><H3>
getPathMap</H3>
<PRE>
public <A HREF="../../../../net/sf/saxon/expr/parser/PathMap.html" title="class in net.sf.saxon.expr.parser">PathMap</A> <B>getPathMap</B>()</PRE>
<DL>
<DD>Get the path map for the query expression
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the path map (which is constructed if this has not already been done)</DL>
</DD>
</DL>
<HR>

<A NAME="getLocationProvider()"><!-- --></A><H3>
getLocationProvider</H3>
<PRE>
public <A HREF="../../../../net/sf/saxon/event/LocationProvider.html" title="interface in net.sf.saxon.event">LocationProvider</A> <B>getLocationProvider</B>()</PRE>
<DL>
<DD>Get the LocationProvider allowing location identifiers to be resolved.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/sf/saxon/expr/Container.html#getLocationProvider()">getLocationProvider</A></CODE> in interface <CODE><A HREF="../../../../net/sf/saxon/expr/Container.html" title="interface in net.sf.saxon.expr">Container</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the location provider</DL>
</DD>
</DL>
<HR>

<A NAME="setAllowDocumentProjection(boolean)"><!-- --></A><H3>
setAllowDocumentProjection</H3>
<PRE>
public void <B>setAllowDocumentProjection</B>(boolean&nbsp;allowed)</PRE>
<DL>
<DD>Indicate that document projection is or is not allowed
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>allowed</CODE> - true if projection is allowed</DL>
</DD>
</DL>
<HR>

<A NAME="isDocumentProjectionAllowed()"><!-- --></A><H3>
isDocumentProjectionAllowed</H3>
<PRE>
public boolean <B>isDocumentProjectionAllowed</B>()</PRE>
<DL>
<DD>Ask whether document projection is allowed
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>true if document projection is allowed</DL>
</DD>
</DL>
<HR>

<A NAME="getPublicId()"><!-- --></A><H3>
getPublicId</H3>
<PRE>
public <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> <B>getPublicId</B>()</PRE>
<DL>
<DD>Return the public identifier for the current document event.
 <p/>
 <p>The return value is the public identifier of the document
 entity or of the external parsed entity in which the markup that
 triggered the event appears.</p>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/SourceLocator.html?is-external=true#getPublicId()" title="class or interface in javax.xml.transform">getPublicId</A></CODE> in interface <CODE><A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/SourceLocator.html?is-external=true" title="class or interface in javax.xml.transform">SourceLocator</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>A string containing the public identifier, or
         null if none is available.<DT><B>See Also:</B><DD><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#getSystemId()"><CODE>getSystemId()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getSystemId()"><!-- --></A><H3>
getSystemId</H3>
<PRE>
public <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> <B>getSystemId</B>()</PRE>
<DL>
<DD>Return the system identifier for the current document event.
 <p/>
 <p>The return value is the system identifier of the document
 entity or of the external parsed entity in which the markup that
 triggered the event appears.</p>
 <p/>
 <p>If the system identifier is a URL, the parser must resolve it
 fully before passing it to the application.</p>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/SourceLocator.html?is-external=true#getSystemId()" title="class or interface in javax.xml.transform">getSystemId</A></CODE> in interface <CODE><A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/SourceLocator.html?is-external=true" title="class or interface in javax.xml.transform">SourceLocator</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>A string containing the system identifier, or null
         if none is available.<DT><B>See Also:</B><DD><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#getPublicId()"><CODE>getPublicId()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getLineNumber()"><!-- --></A><H3>
getLineNumber</H3>
<PRE>
public int <B>getLineNumber</B>()</PRE>
<DL>
<DD>Return the line number where the current document event ends.
 <p/>
 <p><strong>Warning:</strong> The return value from the method
 is intended only as an approximation for the sake of error
 reporting; it is not intended to provide sufficient information
 to edit the character content of the original XML document.</p>
 <p/>
 <p>The return value is an approximation of the line number
 in the document entity or external parsed entity where the
 markup that triggered the event appears.</p>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/SourceLocator.html?is-external=true#getLineNumber()" title="class or interface in javax.xml.transform">getLineNumber</A></CODE> in interface <CODE><A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/SourceLocator.html?is-external=true" title="class or interface in javax.xml.transform">SourceLocator</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>The line number, or -1 if none is available.<DT><B>See Also:</B><DD><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#getColumnNumber()"><CODE>getColumnNumber()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getColumnNumber()"><!-- --></A><H3>
getColumnNumber</H3>
<PRE>
public int <B>getColumnNumber</B>()</PRE>
<DL>
<DD>Return the character position where the current document event ends.
 <p/>
 <p><strong>Warning:</strong> The return value from the method
 is intended only as an approximation for the sake of error
 reporting; it is not intended to provide sufficient information
 to edit the character content of the original XML document.</p>
 <p/>
 <p>The return value is an approximation of the column number
 in the document entity or external parsed entity where the
 markup that triggered the event appears.</p>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/SourceLocator.html?is-external=true#getColumnNumber()" title="class or interface in javax.xml.transform">getColumnNumber</A></CODE> in interface <CODE><A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/SourceLocator.html?is-external=true" title="class or interface in javax.xml.transform">SourceLocator</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>The column number, or -1 if none is available.<DT><B>See Also:</B><DD><A HREF="../../../../net/sf/saxon/query/XQueryExpression.html#getLineNumber()"><CODE>getLineNumber()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getHostLanguage()"><!-- --></A><H3>
getHostLanguage</H3>
<PRE>
public int <B>getHostLanguage</B>()</PRE>
<DL>
<DD>Get the host language (XSLT, XQuery, XPath) used to implement the code in this container
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/sf/saxon/expr/Container.html#getHostLanguage()">getHostLanguage</A></CODE> in interface <CODE><A HREF="../../../../net/sf/saxon/expr/Container.html" title="interface in net.sf.saxon.expr">Container</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>typically <A HREF="../../../../net/sf/saxon/Configuration.html#XSLT"><CODE>Configuration.XSLT</CODE></A> or <A HREF="../../../../net/sf/saxon/Configuration.html#XQUERY"><CODE>Configuration.XQUERY</CODE></A></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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../net/sf/saxon/query/UpdateAgent.html" title="interface in net.sf.saxon.query"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../net/sf/saxon/query/XQueryFunction.html" title="class in net.sf.saxon.query"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?net/sf/saxon/query/XQueryExpression.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="XQueryExpression.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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>