Sophie

Sophie

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

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:26 GMT 2011 -->
<TITLE>
XPathCompiler
</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="XPathCompiler";
    }
}
</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/s9api/XdmValue.html" title="class in net.sf.saxon.s9api"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../net/sf/saxon/s9api/XPathExecutable.html" title="class in net.sf.saxon.s9api"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?net/sf/saxon/s9api/XPathCompiler.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="XPathCompiler.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.s9api</FONT>
<BR>
Class XPathCompiler</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.s9api.XPathCompiler</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>XPathCompiler</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></DL>
</PRE>

<P>
An XPathCompiler object allows XPath queries to be compiled. The compiler holds information that
 represents the static context for an XPath expression.
 <p/>
 <p>To construct an XPathCompiler, use the factory method
 <A HREF="../../../../net/sf/saxon/s9api/Processor.html#newXPathCompiler()"><CODE>Processor.newXPathCompiler()</CODE></A>.</p>
 <p/>
 <p>An XPathCompiler may be used repeatedly to compile multiple
 queries. Any changes made to the XPathCompiler (that is, to the
 static context) do not affect queries that have already been compiled.
 An XPathCompiler may be used concurrently in multiple threads, but
 it should not then be modified once initialized.</p>
 <p/>
 <p>Changes to an XPathCompiler are cumulative. There is no simple way to reset
 the XPathCompiler to its initial state; instead, simply create a new
 XPathCompiler.</p>
 <p/>
 <p>The <code>XPathCompiler</code> has the ability to maintain a cache of compiled
 expressions. This is active only if enabled by calling <A HREF="../../../../net/sf/saxon/s9api/XPathCompiler.html#setCaching(boolean)"><CODE>setCaching(boolean)</CODE></A>.
 If caching is enabled, then the compiler will recognize an attempt to compile
 the same expression twice, and will avoid the cost of recompiling it. The cache
 is emptied by any method that changes the static context for subsequent expressions,
 for example, <A HREF="../../../../net/sf/saxon/s9api/XPathCompiler.html#setBaseURI(java.net.URI)"><CODE>setBaseURI(java.net.URI)</CODE></A>. Unless the cache is emptied,
 it grows indefinitely: compiled expressions are never discarded.</p>
<P>

<P>
<DL>
<DT><B>Since:</B></DT>
  <DD>9.0</DD>
</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/s9api/XPathCompiler.html#XPathCompiler(net.sf.saxon.s9api.Processor)">XPathCompiler</A></B>(<A HREF="../../../../net/sf/saxon/s9api/Processor.html" title="class in net.sf.saxon.s9api">Processor</A>&nbsp;processor)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Protected constructor</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="../../../../net/sf/saxon/s9api/XPathExecutable.html" title="class in net.sf.saxon.s9api">XPathExecutable</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/s9api/XPathCompiler.html#compile(java.lang.String)">compile</A></B>(<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>&nbsp;source)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compile an XPath expression, supplied as a character string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../net/sf/saxon/s9api/XPathExecutable.html" title="class in net.sf.saxon.s9api">XPathExecutable</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/s9api/XPathCompiler.html#compilePattern(java.lang.String)">compilePattern</A></B>(<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>&nbsp;source)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compile an XSLT 2.0 pattern, supplied as a character string.</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/s9api/XPathCompiler.html#declareCollation(java.lang.String, java.text.Collator)">declareCollation</A></B>(<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>&nbsp;uri,
                 <A HREF="http://download.oracle.com/javase/6/docs/api/java/text/Collator.html?is-external=true" title="class or interface in java.text">Collator</A>&nbsp;collation)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bind a collation URI to a collation</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/s9api/XPathCompiler.html#declareDefaultCollation(java.lang.String)">declareDefaultCollation</A></B>(<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>&nbsp;uri)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Declare the default collation</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/s9api/XPathCompiler.html#declareNamespace(java.lang.String, java.lang.String)">declareNamespace</A></B>(<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>&nbsp;prefix,
                 <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>&nbsp;uri)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Declare a namespace binding as part of the static context for XPath expressions compiled using this
 XPathCompiler</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/s9api/XPathCompiler.html#declareVariable(net.sf.saxon.s9api.QName)">declareVariable</A></B>(<A HREF="../../../../net/sf/saxon/s9api/QName.html" title="class in net.sf.saxon.s9api">QName</A>&nbsp;qname)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Declare a variable as part of the static context for XPath expressions compiled using this
 XPathCompiler.</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/s9api/XPathCompiler.html#declareVariable(net.sf.saxon.s9api.QName, net.sf.saxon.s9api.ItemType, net.sf.saxon.s9api.OccurrenceIndicator)">declareVariable</A></B>(<A HREF="../../../../net/sf/saxon/s9api/QName.html" title="class in net.sf.saxon.s9api">QName</A>&nbsp;qname,
                <A HREF="../../../../net/sf/saxon/s9api/ItemType.html" title="class in net.sf.saxon.s9api">ItemType</A>&nbsp;itemType,
                <A HREF="../../../../net/sf/saxon/s9api/OccurrenceIndicator.html" title="enum in net.sf.saxon.s9api">OccurrenceIndicator</A>&nbsp;occurrences)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Declare a variable as part of the static context for XPath expressions compiled using this
 XPathCompiler.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../net/sf/saxon/s9api/XdmValue.html" title="class in net.sf.saxon.s9api">XdmValue</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/s9api/XPathCompiler.html#evaluate(java.lang.String, net.sf.saxon.s9api.XdmItem)">evaluate</A></B>(<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>&nbsp;expression,
         <A HREF="../../../../net/sf/saxon/s9api/XdmItem.html" title="class in net.sf.saxon.s9api">XdmItem</A>&nbsp;contextItem)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compile and evaluate an XPath expression, supplied as a character string, with a given
 context item.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../net/sf/saxon/s9api/XdmItem.html" title="class in net.sf.saxon.s9api">XdmItem</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/s9api/XPathCompiler.html#evaluateSingle(java.lang.String, net.sf.saxon.s9api.XdmItem)">evaluateSingle</A></B>(<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>&nbsp;expression,
               <A HREF="../../../../net/sf/saxon/s9api/XdmItem.html" title="class in net.sf.saxon.s9api">XdmItem</A>&nbsp;contextItem)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compile and evaluate an XPath expression whose result is expected to be
 a single item, with a given context item.</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/net/URI.html?is-external=true" title="class or interface in java.net">URI</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/s9api/XPathCompiler.html#getBaseURI()">getBaseURI</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the static base URI for XPath expressions compiled using this XPathCompiler.</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/s9api/XPathCompiler.html#getLanguageVersion()">getLanguageVersion</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ask whether an XPath 2.0 or XPath 3.0 processor is being used</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../net/sf/saxon/s9api/Processor.html" title="class in net.sf.saxon.s9api">Processor</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/s9api/XPathCompiler.html#getProcessor()">getProcessor</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the Processor from which this XPathCompiler was constructed</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../net/sf/saxon/s9api/ItemType.html" title="class in net.sf.saxon.s9api">ItemType</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/s9api/XPathCompiler.html#getRequiredContextItemType()">getRequiredContextItemType</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the required type of the context item.</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/StaticContext.html" title="interface in net.sf.saxon.expr">StaticContext</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/s9api/XPathCompiler.html#getUnderlyingStaticContext()">getUnderlyingStaticContext</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Escape-hatch method to get the underlying static context object used by the implementation.</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/s9api/XPathCompiler.html#importSchemaNamespace(java.lang.String)">importSchemaNamespace</A></B>(<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>&nbsp;uri)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Import a schema namespace: that is, add the element and attribute declarations and type definitions
 contained in a given namespace to the static context for the XPath expression.</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/s9api/XPathCompiler.html#isAllowUndeclaredVariables()">isAllowUndeclaredVariables</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ask whether undeclared variables are 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/s9api/XPathCompiler.html#isBackwardsCompatible()">isBackwardsCompatible</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ask whether XPath 1.0 backwards compatibility mode is in force.</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/s9api/XPathCompiler.html#isCaching()">isCaching</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ask whether the compiler is maintaining a cache of compiled expressions</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/s9api/XPathCompiler.html#isSchemaAware()">isSchemaAware</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ask whether XPath expressions compiled using this XPathCompiler are
 schema-aware.</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/s9api/XPathCompiler.html#setAllowUndeclaredVariables(boolean)">setAllowUndeclaredVariables</A></B>(boolean&nbsp;allow)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Say whether undeclared variables are allowed.</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/s9api/XPathCompiler.html#setBackwardsCompatible(boolean)">setBackwardsCompatible</A></B>(boolean&nbsp;option)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set whether XPath 1.0 backwards compatibility mode is to be used.</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/s9api/XPathCompiler.html#setBaseURI(java.net.URI)">setBaseURI</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>&nbsp;uri)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the static base URI for XPath expressions compiled using this XPathCompiler.</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/s9api/XPathCompiler.html#setCaching(boolean)">setCaching</A></B>(boolean&nbsp;caching)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Say whether the compiler should maintain a cache of compiled expressions.</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/s9api/XPathCompiler.html#setDecimalFormatProperty(net.sf.saxon.s9api.QName, java.lang.String, java.lang.String)">setDecimalFormatProperty</A></B>(<A HREF="../../../../net/sf/saxon/s9api/QName.html" title="class in net.sf.saxon.s9api">QName</A>&nbsp;format,
                         <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>&nbsp;property,
                         <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>&nbsp;value)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Registers the required decimal format properties</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/s9api/XPathCompiler.html#setLanguageVersion(java.lang.String)">setLanguageVersion</A></B>(<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>&nbsp;version)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Say whether an XPath 2.0 or XPath 3.0 processor is required.</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/s9api/XPathCompiler.html#setRequiredContextItemType(net.sf.saxon.s9api.ItemType)">setRequiredContextItemType</A></B>(<A HREF="../../../../net/sf/saxon/s9api/ItemType.html" title="class in net.sf.saxon.s9api">ItemType</A>&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Declare the static type of the context item.</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/s9api/XPathCompiler.html#setSchemaAware(boolean)">setSchemaAware</A></B>(boolean&nbsp;schemaAware)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Say whether XPath expressions compiled using this XPathCompiler are
 schema-aware.</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="XPathCompiler(net.sf.saxon.s9api.Processor)"><!-- --></A><H3>
XPathCompiler</H3>
<PRE>
protected <B>XPathCompiler</B>(<A HREF="../../../../net/sf/saxon/s9api/Processor.html" title="class in net.sf.saxon.s9api">Processor</A>&nbsp;processor)</PRE>
<DL>
<DD>Protected constructor
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>processor</CODE> - the s9api Processor</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="getProcessor()"><!-- --></A><H3>
getProcessor</H3>
<PRE>
public <A HREF="../../../../net/sf/saxon/s9api/Processor.html" title="class in net.sf.saxon.s9api">Processor</A> <B>getProcessor</B>()</PRE>
<DL>
<DD>Get the Processor from which this XPathCompiler was constructed
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the Processor to which this XPathCompiler belongs<DT><B>Since:</B></DT>
  <DD>9.3</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="setBackwardsCompatible(boolean)"><!-- --></A><H3>
setBackwardsCompatible</H3>
<PRE>
public void <B>setBackwardsCompatible</B>(boolean&nbsp;option)</PRE>
<DL>
<DD>Set whether XPath 1.0 backwards compatibility mode is to be used. In backwards compatibility
 mode, more implicit type conversions are allowed in XPath expressions, for example it
 is possible to compare a number with a string. The default is false (backwards compatibility
 mode is off).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>option</CODE> - true if XPath 1.0 backwards compatibility is to be enabled, false if it is to
               be disabled.</DL>
</DD>
</DL>
<HR>

<A NAME="isBackwardsCompatible()"><!-- --></A><H3>
isBackwardsCompatible</H3>
<PRE>
public boolean <B>isBackwardsCompatible</B>()</PRE>
<DL>
<DD>Ask whether XPath 1.0 backwards compatibility mode is in force.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>true if XPath 1.0 backwards compatibility is enabled, false if it is disabled.</DL>
</DD>
</DL>
<HR>

<A NAME="setSchemaAware(boolean)"><!-- --></A><H3>
setSchemaAware</H3>
<PRE>
public void <B>setSchemaAware</B>(boolean&nbsp;schemaAware)</PRE>
<DL>
<DD>Say whether XPath expressions compiled using this XPathCompiler are
 schema-aware. They will automatically be schema-aware if the method
 <A HREF="../../../../net/sf/saxon/s9api/XPathCompiler.html#importSchemaNamespace(java.lang.String)"><CODE>importSchemaNamespace(String)</CODE></A> is called. An XPath expression
 must be marked as schema-aware if it is to handle typed (validated)
 input documents.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>schemaAware</CODE> - true if expressions are to be schema-aware, false otherwise<DT><B>Since:</B></DT>
  <DD>9.3</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="isSchemaAware()"><!-- --></A><H3>
isSchemaAware</H3>
<PRE>
public boolean <B>isSchemaAware</B>()</PRE>
<DL>
<DD>Ask whether XPath expressions compiled using this XPathCompiler are
 schema-aware. They will automatically be schema-aware if the method
 <A HREF="../../../../net/sf/saxon/s9api/XPathCompiler.html#importSchemaNamespace(java.lang.String)"><CODE>importSchemaNamespace(String)</CODE></A> is called. An XPath expression
 must be marked as schema-aware if it is to handle typed (validated)
 input documents.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>true if expressions are to be schema-aware, false otherwise<DT><B>Since:</B></DT>
  <DD>9.3</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="setLanguageVersion(java.lang.String)"><!-- --></A><H3>
setLanguageVersion</H3>
<PRE>
public void <B>setLanguageVersion</B>(<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>&nbsp;version)</PRE>
<DL>
<DD>Say whether an XPath 2.0 or XPath 3.0 processor is required.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>version</CODE> - Must be numerically equal to 1.0, 2.0 or 3.0. Currently
                support for XPath 3.0 is incomplete: check the release notes.
                <p>Setting the option to 1.0 requests an XPath 2.0 processor running in 1.0 compatibility mode;
                this is equivalent to setting the language version to 2.0 and backwards compatibility mode to true.</p>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the version is not numerically equal to 1.0, 2.0 or 3.0.<DT><B>Since:</B></DT>
  <DD>9.3</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="getLanguageVersion()"><!-- --></A><H3>
getLanguageVersion</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>getLanguageVersion</B>()</PRE>
<DL>
<DD>Ask whether an XPath 2.0 or XPath 3.0 processor is being used
<P>
<DD><DL>

<DT><B>Returns:</B><DD>version: "2.0" or "3.0"<DT><B>Since:</B></DT>
  <DD>9.3</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="setBaseURI(java.net.URI)"><!-- --></A><H3>
setBaseURI</H3>
<PRE>
public void <B>setBaseURI</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>&nbsp;uri)</PRE>
<DL>
<DD>Set the static base URI for XPath expressions compiled using this XPathCompiler. The base URI
 is part of the static context, and is used to resolve any relative URIs appearing within an XPath
 expression, for example a relative URI passed as an argument to the doc() function. If no
 static base URI is supplied, then the current working directory is used.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>uri</CODE> - the base URI to be set in the static context. This must be an absolute URI.</DL>
</DD>
</DL>
<HR>

<A NAME="getBaseURI()"><!-- --></A><H3>
getBaseURI</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A> <B>getBaseURI</B>()</PRE>
<DL>
<DD>Get the static base URI for XPath expressions compiled using this XPathCompiler. The base URI
 is part of the static context, and is used to resolve any relative URIs appearing within an XPath
 expression, for example a relative URI passed as an argument to the doc() function. If no
 static base URI has been explicitly set, this method returns null.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the base URI from the static context</DL>
</DD>
</DL>
<HR>

<A NAME="declareNamespace(java.lang.String, java.lang.String)"><!-- --></A><H3>
declareNamespace</H3>
<PRE>
public void <B>declareNamespace</B>(<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>&nbsp;prefix,
                             <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>&nbsp;uri)</PRE>
<DL>
<DD>Declare a namespace binding as part of the static context for XPath expressions compiled using this
 XPathCompiler
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>prefix</CODE> - The namespace prefix. If the value is a zero-length string, this method sets the default
               namespace for elements and types.<DD><CODE>uri</CODE> - The namespace URI. It is possible to specify a zero-length string to "undeclare" a namespace;
               in this case the prefix will not be available for use, except in the case where the prefix
               is also a zero length string, in which case the absence of a prefix implies that the name
               is in no namespace.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if either the prefix or uri is null.</DL>
</DD>
</DL>
<HR>

<A NAME="importSchemaNamespace(java.lang.String)"><!-- --></A><H3>
importSchemaNamespace</H3>
<PRE>
public void <B>importSchemaNamespace</B>(<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>&nbsp;uri)</PRE>
<DL>
<DD>Import a schema namespace: that is, add the element and attribute declarations and type definitions
 contained in a given namespace to the static context for the XPath expression.
 <p/>
 <p>This method will not cause the schema to be loaded. That must be done separately, using the
 <A HREF="../../../../net/sf/saxon/s9api/SchemaManager.html" title="class in net.sf.saxon.s9api"><CODE>SchemaManager</CODE></A>. This method will not fail if the schema has not been loaded (but in that case
 the set of declarations and definitions made available to the XPath expression is empty). The schema
 document for the specified namespace may be loaded before or after this method is called.</p>
 <p/>
 <p>This method does not bind a prefix to the namespace. That must be done separately, using the
 <A HREF="../../../../net/sf/saxon/s9api/XPathCompiler.html#declareNamespace(java.lang.String, java.lang.String)"><CODE>declareNamespace(String, String)</CODE></A> method.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>uri</CODE> - The schema namespace to be imported. To import declarations in a no-namespace schema,
            supply a zero-length string.<DT><B>Since:</B></DT>
  <DD>9.1</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="setAllowUndeclaredVariables(boolean)"><!-- --></A><H3>
setAllowUndeclaredVariables</H3>
<PRE>
public void <B>setAllowUndeclaredVariables</B>(boolean&nbsp;allow)</PRE>
<DL>
<DD>Say whether undeclared variables are allowed. By default, they are not allowed. When
 undeclared variables are allowed, it is not necessary to predeclare the variables that
 may be used in the XPath expression; instead, a variable is automatically declared when a reference
 to the variable is encountered within the expression.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>allow</CODE> - true if undeclared variables are allowed, false if they are not allowed.<DT><B>Since:</B></DT>
  <DD>9.2</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="isAllowUndeclaredVariables()"><!-- --></A><H3>
isAllowUndeclaredVariables</H3>
<PRE>
public boolean <B>isAllowUndeclaredVariables</B>()</PRE>
<DL>
<DD>Ask whether undeclared variables are allowed. By default, they are not allowed. When
 undeclared variables are allowed, it is not necessary to predeclare the variables that
 may be used in the XPath expression; instead, a variable is automatically declared when a reference
 to the variable is encountered within the expression.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>true if undeclared variables are allowed, false if they are not allowed.<DT><B>Since:</B></DT>
  <DD>9.2</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="declareVariable(net.sf.saxon.s9api.QName)"><!-- --></A><H3>
declareVariable</H3>
<PRE>
public void <B>declareVariable</B>(<A HREF="../../../../net/sf/saxon/s9api/QName.html" title="class in net.sf.saxon.s9api">QName</A>&nbsp;qname)</PRE>
<DL>
<DD>Declare a variable as part of the static context for XPath expressions compiled using this
 XPathCompiler. It is an error for the XPath expression to refer to a variable unless it has been
 declared. This method declares the existence of the variable, but it does not
 bind any value to the variable; that is done later, when the XPath expression is evaluated.
 The variable is allowed to have any type (that is, the required type is <code>item()*</code>).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>qname</CODE> - The name of the variable, expressions as a QName</DL>
</DD>
</DL>
<HR>

<A NAME="declareVariable(net.sf.saxon.s9api.QName, net.sf.saxon.s9api.ItemType, net.sf.saxon.s9api.OccurrenceIndicator)"><!-- --></A><H3>
declareVariable</H3>
<PRE>
public void <B>declareVariable</B>(<A HREF="../../../../net/sf/saxon/s9api/QName.html" title="class in net.sf.saxon.s9api">QName</A>&nbsp;qname,
                            <A HREF="../../../../net/sf/saxon/s9api/ItemType.html" title="class in net.sf.saxon.s9api">ItemType</A>&nbsp;itemType,
                            <A HREF="../../../../net/sf/saxon/s9api/OccurrenceIndicator.html" title="enum in net.sf.saxon.s9api">OccurrenceIndicator</A>&nbsp;occurrences)
                     throws <A HREF="../../../../net/sf/saxon/s9api/SaxonApiException.html" title="class in net.sf.saxon.s9api">SaxonApiException</A></PRE>
<DL>
<DD>Declare a variable as part of the static context for XPath expressions compiled using this
 XPathCompiler. It is an error for the XPath expression to refer to a variable unless it has been
 declared. This method declares the existence of the variable, and defines the required type
 of the variable, but it does not bind any value to the variable; that is done later,
 when the XPath expression is evaluated.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>qname</CODE> - The name of the variable, expressed as a QName<DD><CODE>itemType</CODE> - The required item type of the value of the variable<DD><CODE>occurrences</CODE> - The allowed number of items in the sequence forming the value of the variable
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../net/sf/saxon/s9api/SaxonApiException.html" title="class in net.sf.saxon.s9api">SaxonApiException</A></CODE> - if the requiredType is syntactically invalid or if it refers to namespace
                           prefixes or schema components that are not present in the static context</DL>
</DD>
</DL>
<HR>

<A NAME="setRequiredContextItemType(net.sf.saxon.s9api.ItemType)"><!-- --></A><H3>
setRequiredContextItemType</H3>
<PRE>
public void <B>setRequiredContextItemType</B>(<A HREF="../../../../net/sf/saxon/s9api/ItemType.html" title="class in net.sf.saxon.s9api">ItemType</A>&nbsp;type)</PRE>
<DL>
<DD>Declare the static type of the context item. If this type is declared, and if a context item
 is supplied when the query is invoked, then the context item must conform to this type (no
 type conversion will take place to force it into this type).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - the required type of the context item<DT><B>Since:</B></DT>
  <DD>9.3</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="getRequiredContextItemType()"><!-- --></A><H3>
getRequiredContextItemType</H3>
<PRE>
public <A HREF="../../../../net/sf/saxon/s9api/ItemType.html" title="class in net.sf.saxon.s9api">ItemType</A> <B>getRequiredContextItemType</B>()</PRE>
<DL>
<DD>Get the required type of the context item. If no type has been explicitly declared for the context
 item, an instance of AnyItemType (representing the type item()) is returned.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the required type of the context item<DT><B>Since:</B></DT>
  <DD>9.3</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="declareCollation(java.lang.String, java.text.Collator)"><!-- --></A><H3>
declareCollation</H3>
<PRE>
public void <B>declareCollation</B>(<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>&nbsp;uri,
                             <A HREF="http://download.oracle.com/javase/6/docs/api/java/text/Collator.html?is-external=true" title="class or interface in java.text">Collator</A>&nbsp;collation)</PRE>
<DL>
<DD>Bind a collation URI to a collation
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>uri</CODE> - the absolute collation URI<DD><CODE>collation</CODE> - a <A HREF="http://download.oracle.com/javase/6/docs/api/java/text/Collator.html?is-external=true" title="class or interface in java.text"><CODE>Collator</CODE></A> object that implements the required collation
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an attempt is made to rebind the standard URI
                                  for the Unicode codepoint collation<DT><B>Since:</B></DT>
  <DD>9.4</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="declareDefaultCollation(java.lang.String)"><!-- --></A><H3>
declareDefaultCollation</H3>
<PRE>
public void <B>declareDefaultCollation</B>(<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>&nbsp;uri)</PRE>
<DL>
<DD>Declare the default collation
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>uri</CODE> - the absolute URI of the default collation. This URI must have been bound to a collation
            using the method <A HREF="../../../../net/sf/saxon/s9api/XPathCompiler.html#declareCollation(java.lang.String, java.text.Collator)"><CODE>declareCollation(String, Collator)</CODE></A>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the collation URI has not been registered, unless it is the standard
                               Unicode codepoint collation which is registered implicitly<DT><B>Since:</B></DT>
  <DD>9.4</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="setCaching(boolean)"><!-- --></A><H3>
setCaching</H3>
<PRE>
public void <B>setCaching</B>(boolean&nbsp;caching)</PRE>
<DL>
<DD>Say whether the compiler should maintain a cache of compiled expressions.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>caching</CODE> - if set to true, caching of compiled expressions is enabled.
                If set to false, any existing cache is cleared, and future compiled expressions
                will not be cached until caching is re-enabled. The cache is also cleared
                (but without disabling future caching)
                if any method is called that changes the static context for compiling
                expressions, for example <A HREF="../../../../net/sf/saxon/s9api/XPathCompiler.html#declareVariable(net.sf.saxon.s9api.QName)"><CODE>declareVariable(QName)</CODE></A> or
                <A HREF="../../../../net/sf/saxon/s9api/XPathCompiler.html#declareNamespace(java.lang.String, java.lang.String)"><CODE>declareNamespace(String, String)</CODE></A>.<DT><B>Since:</B></DT>
  <DD>9.3</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="isCaching()"><!-- --></A><H3>
isCaching</H3>
<PRE>
public boolean <B>isCaching</B>()</PRE>
<DL>
<DD>Ask whether the compiler is maintaining a cache of compiled expressions
<P>
<DD><DL>

<DT><B>Returns:</B><DD>true if a cache is being maintained<DT><B>Since:</B></DT>
  <DD>9.3</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="compile(java.lang.String)"><!-- --></A><H3>
compile</H3>
<PRE>
public <A HREF="../../../../net/sf/saxon/s9api/XPathExecutable.html" title="class in net.sf.saxon.s9api">XPathExecutable</A> <B>compile</B>(<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>&nbsp;source)
                        throws <A HREF="../../../../net/sf/saxon/s9api/SaxonApiException.html" title="class in net.sf.saxon.s9api">SaxonApiException</A></PRE>
<DL>
<DD>Compile an XPath expression, supplied as a character string.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>source</CODE> - A string containing the source text of the XPath expression
<DT><B>Returns:</B><DD>An XPathExecutable which represents the compiled xpath expression object.
         The XPathExecutable may be run as many times as required, in the same or a different thread.
         The XPathExecutable is not affected by any changes made to the XPathCompiler once it has been compiled.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../net/sf/saxon/s9api/SaxonApiException.html" title="class in net.sf.saxon.s9api">SaxonApiException</A></CODE> - if any static error is detected while analyzing the expression</DL>
</DD>
</DL>
<HR>

<A NAME="evaluate(java.lang.String, net.sf.saxon.s9api.XdmItem)"><!-- --></A><H3>
evaluate</H3>
<PRE>
public <A HREF="../../../../net/sf/saxon/s9api/XdmValue.html" title="class in net.sf.saxon.s9api">XdmValue</A> <B>evaluate</B>(<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>&nbsp;expression,
                         <A HREF="../../../../net/sf/saxon/s9api/XdmItem.html" title="class in net.sf.saxon.s9api">XdmItem</A>&nbsp;contextItem)
                  throws <A HREF="../../../../net/sf/saxon/s9api/SaxonApiException.html" title="class in net.sf.saxon.s9api">SaxonApiException</A></PRE>
<DL>
<DD>Compile and evaluate an XPath expression, supplied as a character string, with a given
 context item.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>expression</CODE> - A string containing the source text of the XPath expression<DD><CODE>contextItem</CODE> - The context item to be used for evaluating the expression. This
                    may be null if the expression is to be evaluated with no context item.
<DT><B>Returns:</B><DD>the result of evaluating the XPath expression with this context item. Note that
         the result is an iterable, so that it can be used in a construct such as
         <code>for (XdmItem item : xpath.evaluate("//x", doc) {...}</code>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../net/sf/saxon/s9api/SaxonApiException.html" title="class in net.sf.saxon.s9api">SaxonApiException</A></CODE> - if any static error is detected while analyzing the expression,
                           or if any dynamic error is detected while evaluating it.<DT><B>Since:</B></DT>
  <DD>9.3</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="evaluateSingle(java.lang.String, net.sf.saxon.s9api.XdmItem)"><!-- --></A><H3>
evaluateSingle</H3>
<PRE>
public <A HREF="../../../../net/sf/saxon/s9api/XdmItem.html" title="class in net.sf.saxon.s9api">XdmItem</A> <B>evaluateSingle</B>(<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>&nbsp;expression,
                              <A HREF="../../../../net/sf/saxon/s9api/XdmItem.html" title="class in net.sf.saxon.s9api">XdmItem</A>&nbsp;contextItem)
                       throws <A HREF="../../../../net/sf/saxon/s9api/SaxonApiException.html" title="class in net.sf.saxon.s9api">SaxonApiException</A></PRE>
<DL>
<DD>Compile and evaluate an XPath expression whose result is expected to be
 a single item, with a given context item. The expression is supplied as
 a character string.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>expression</CODE> - A string containing the source text of the XPath expression<DD><CODE>contextItem</CODE> - The context item to be used for evaluating the expression. This
                    may be null if the expression is to be evaluated with no context item.
<DT><B>Returns:</B><DD>the result of evaluating the XPath expression with this context item.
         If the result is a singleton it is returned as an XdmItem; if it is an empty
         sequence, the return value is null. If the expression returns a sequence of more than one item,
         any items after the first are ignored.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../net/sf/saxon/s9api/SaxonApiException.html" title="class in net.sf.saxon.s9api">SaxonApiException</A></CODE> - if any static error is detected while analyzing the expression,
                           or if any dynamic error is detected while evaluating it.<DT><B>Since:</B></DT>
  <DD>9.3</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="compilePattern(java.lang.String)"><!-- --></A><H3>
compilePattern</H3>
<PRE>
public <A HREF="../../../../net/sf/saxon/s9api/XPathExecutable.html" title="class in net.sf.saxon.s9api">XPathExecutable</A> <B>compilePattern</B>(<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>&nbsp;source)
                               throws <A HREF="../../../../net/sf/saxon/s9api/SaxonApiException.html" title="class in net.sf.saxon.s9api">SaxonApiException</A></PRE>
<DL>
<DD>Compile an XSLT 2.0 pattern, supplied as a character string. The compiled pattern behaves as a boolean
 expression which, when evaluated in a particular context, returns true if the context node matches
 the pattern, and false if it does not. An error is reported if there is no context item or it the context
 item is not a node.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>source</CODE> - A string conforming to the syntax of XSLT 2.0 patterns
<DT><B>Returns:</B><DD>An XPathExecutable representing an expression which evaluates to true when the context node matches
         the pattern, and false when it does not.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../net/sf/saxon/s9api/SaxonApiException.html" title="class in net.sf.saxon.s9api">SaxonApiException</A></CODE> - if the pattern contains static errors: for example, if its syntax is incorrect,
                           or if it refers to undeclared variables or namespaces<DT><B>Since:</B></DT>
  <DD>9.1</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="setDecimalFormatProperty(net.sf.saxon.s9api.QName, java.lang.String, java.lang.String)"><!-- --></A><H3>
setDecimalFormatProperty</H3>
<PRE>
public void <B>setDecimalFormatProperty</B>(<A HREF="../../../../net/sf/saxon/s9api/QName.html" title="class in net.sf.saxon.s9api">QName</A>&nbsp;format,
                                     <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>&nbsp;property,
                                     <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>&nbsp;value)
                              throws <A HREF="../../../../net/sf/saxon/s9api/SaxonApiException.html" title="class in net.sf.saxon.s9api">SaxonApiException</A></PRE>
<DL>
<DD>Registers the required decimal format properties
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>format</CODE> - The name of the decimal format<DD><CODE>property</CODE> - The decimal symbols name to update<DD><CODE>value</CODE> - The value to update the decimal symbol property
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../net/sf/saxon/s9api/SaxonApiException.html" title="class in net.sf.saxon.s9api">SaxonApiException</A></CODE> - if there are two conflicting definitions of the named decimal-format<DT><B>Since:</B></DT>
  <DD>9.4</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="getUnderlyingStaticContext()"><!-- --></A><H3>
getUnderlyingStaticContext</H3>
<PRE>
public <A HREF="../../../../net/sf/saxon/expr/StaticContext.html" title="interface in net.sf.saxon.expr">StaticContext</A> <B>getUnderlyingStaticContext</B>()</PRE>
<DL>
<DD>Escape-hatch method to get the underlying static context object used by the implementation.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the underlying static context object. In the current implementation this will always
         be an instance of <A HREF="../../../../net/sf/saxon/sxpath/IndependentContext.html" title="class in net.sf.saxon.sxpath"><CODE>IndependentContext</CODE></A>.
         <p/>
         <p>This method provides an escape hatch to internal Saxon implementation objects that offer a finer and
         lower-level degree of control than the s9api classes and methods. Some of these classes and methods may change
         from release to release.</p><DT><B>Since:</B></DT>
  <DD>9.1</DD>
</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/s9api/XdmValue.html" title="class in net.sf.saxon.s9api"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../net/sf/saxon/s9api/XPathExecutable.html" title="class in net.sf.saxon.s9api"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?net/sf/saxon/s9api/XPathCompiler.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="XPathCompiler.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>