Sophie

Sophie

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

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:36 GMT 2011 -->
<TITLE>
XPathEvaluator
</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="XPathEvaluator";
    }
}
</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/sxpath/XPathDynamicContext.html" title="class in net.sf.saxon.sxpath"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../net/sf/saxon/sxpath/XPathExpression.html" title="class in net.sf.saxon.sxpath"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?net/sf/saxon/sxpath/XPathEvaluator.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="XPathEvaluator.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.sxpath</FONT>
<BR>
Class XPathEvaluator</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.sxpath.XPathEvaluator</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>XPathEvaluator</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>
This class provides a native Saxon API for free-standing evaluation of XPath expressions. Unlike the
 JAXP API offered by <A HREF="../../../../net/sf/saxon/xpath/XPathEvaluator.html" title="class in net.sf.saxon.xpath"><CODE>XPathEvaluator</CODE></A> it exposes Saxon classes and interfaces
 and thus provides a more strongly-typed interface with greater control over the detailed behaviour.

 <p>However, the preferred API for user applications calling XPath is the s9api <A HREF="../../../../net/sf/saxon/s9api/XPathCompiler.html" title="class in net.sf.saxon.s9api"><CODE>XPathCompiler</CODE></A>
 interface.</p>
<P>

<P>
<DL>
<DT><B>Since:</B></DT>
  <DD>8.4</DD>
<DT><B>Author:</B></DT>
  <DD>Michael H. Kay</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><CODE><B><A HREF="../../../../net/sf/saxon/sxpath/XPathEvaluator.html#XPathEvaluator()">XPathEvaluator</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default constructor.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../net/sf/saxon/sxpath/XPathEvaluator.html#XPathEvaluator(net.sf.saxon.Configuration)">XPathEvaluator</A></B>(<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;Construct an XPathEvaluator with a specified configuration.</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/sxpath/XPathExpression.html" title="class in net.sf.saxon.sxpath">XPathExpression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/sxpath/XPathEvaluator.html#createExpression(java.lang.String)">createExpression</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)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Prepare (compile) an XPath expression for subsequent evaluation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../net/sf/saxon/sxpath/XPathExpression.html" title="class in net.sf.saxon.sxpath">XPathExpression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/sxpath/XPathEvaluator.html#createPattern(java.lang.String)">createPattern</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;pattern)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Prepare (compile) an XSLT pattern for subsequent evaluation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../net/sf/saxon/sxpath/XPathVariable.html" title="class in net.sf.saxon.sxpath">XPathVariable</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/sxpath/XPathEvaluator.html#declareVariable(java.lang.String, java.lang.String)">declareVariable</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/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;localName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Declare a variable, making it available for use within a subsequently-compiled XPath 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/Configuration.html" title="class in net.sf.saxon">Configuration</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/sxpath/XPathEvaluator.html#getConfiguration()">getConfiguration</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the Configuration in use.</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/NamespaceResolver.html" title="interface in net.sf.saxon.om">NamespaceResolver</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/sxpath/XPathEvaluator.html#getNamespaceResolver()">getNamespaceResolver</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the external namespace resolver, if one has been set using <A HREF="../../../../net/sf/saxon/sxpath/XPathEvaluator.html#setNamespaceResolver(net.sf.saxon.om.NamespaceResolver)"><CODE>setNamespaceResolver(net.sf.saxon.om.NamespaceResolver)</CODE></A></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../net/sf/saxon/sxpath/XPathStaticContext.html" title="interface in net.sf.saxon.sxpath">XPathStaticContext</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sf/saxon/sxpath/XPathEvaluator.html#getStaticContext()">getStaticContext</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the current static context.</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/sxpath/XPathEvaluator.html#setDefaultElementNamespace(java.lang.String)">setDefaultElementNamespace</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;Set the default namespace for elements and types</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/sxpath/XPathEvaluator.html#setNamespaceResolver(net.sf.saxon.om.NamespaceResolver)">setNamespaceResolver</A></B>(<A HREF="../../../../net/sf/saxon/om/NamespaceResolver.html" title="interface in net.sf.saxon.om">NamespaceResolver</A>&nbsp;namespaceResolver)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the external namespace resolver 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/sxpath/XPathEvaluator.html#setStaticContext(net.sf.saxon.sxpath.XPathStaticContext)">setStaticContext</A></B>(<A HREF="../../../../net/sf/saxon/sxpath/XPathStaticContext.html" title="interface in net.sf.saxon.sxpath">XPathStaticContext</A>&nbsp;context)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the static context for compiling XPath expressions.</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="XPathEvaluator()"><!-- --></A><H3>
XPathEvaluator</H3>
<PRE>
public <B>XPathEvaluator</B>()</PRE>
<DL>
<DD>Default constructor. Creates an XPathEvaluator with a default configuration and name pool.
 Note that any source documents used by an XPath expression under this XPathEvaluator must
 be built using the <A HREF="../../../../net/sf/saxon/Configuration.html" title="class in net.sf.saxon"><CODE>Configuration</CODE></A> that is implicitly created by this constructor,
 which is accessible using the <A HREF="../../../../net/sf/saxon/sxpath/XPathEvaluator.html#getConfiguration()"><CODE>getConfiguration()</CODE></A> method.
<P>
</DL>
<HR>

<A NAME="XPathEvaluator(net.sf.saxon.Configuration)"><!-- --></A><H3>
XPathEvaluator</H3>
<PRE>
public <B>XPathEvaluator</B>(<A HREF="../../../../net/sf/saxon/Configuration.html" title="class in net.sf.saxon">Configuration</A>&nbsp;config)</PRE>
<DL>
<DD>Construct an XPathEvaluator with a specified configuration.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>config</CODE> - the configuration to be used. If the XPathEvaluator is
 to be used to run schema-aware XPath expressions this must be an instance
 of <A HREF="../../../../com/saxonica/config/EnterpriseConfiguration.html" title="class in com.saxonica.config"><CODE>EnterpriseConfiguration</CODE></A></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="getConfiguration()"><!-- --></A><H3>
getConfiguration</H3>
<PRE>
public <A HREF="../../../../net/sf/saxon/Configuration.html" title="class in net.sf.saxon">Configuration</A> <B>getConfiguration</B>()</PRE>
<DL>
<DD>Get the Configuration in use.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the Saxon configuration</DL>
</DD>
</DL>
<HR>

<A NAME="declareVariable(java.lang.String, java.lang.String)"><!-- --></A><H3>
declareVariable</H3>
<PRE>
public <A HREF="../../../../net/sf/saxon/sxpath/XPathVariable.html" title="class in net.sf.saxon.sxpath">XPathVariable</A> <B>declareVariable</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/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;localName)</PRE>
<DL>
<DD>Declare a variable, making it available for use within a subsequently-compiled XPath expression.
 The variable may subsequently be assigned a value using the method
 <A HREF="../../../../net/sf/saxon/sxpath/XPathDynamicContext.html#setVariable(net.sf.saxon.sxpath.XPathVariable, net.sf.saxon.om.ValueRepresentation)"><CODE>XPathDynamicContext.setVariable(XPathVariable, net.sf.saxon.om.ValueRepresentation)</CODE></A>.
 Any external variable used in an XPath expression must be declared before the XPath expression
 is compiled.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>uri</CODE> - The namespace URI of the variable name. Use "" for the null namespace.<DD><CODE>localName</CODE> - The local part of the variable name.
<DT><B>Returns:</B><DD>an object representing the variable</DL>
</DD>
</DL>
<HR>

<A NAME="setStaticContext(net.sf.saxon.sxpath.XPathStaticContext)"><!-- --></A><H3>
setStaticContext</H3>
<PRE>
public void <B>setStaticContext</B>(<A HREF="../../../../net/sf/saxon/sxpath/XPathStaticContext.html" title="interface in net.sf.saxon.sxpath">XPathStaticContext</A>&nbsp;context)</PRE>
<DL>
<DD>Set the static context for compiling XPath expressions. This provides more detailed control over the
 environment in which the expression is compiled, for example it allows namespace prefixes to
 be declared, variables to be bound and functions to be defined. For most purposes, the static
 context can be defined by providing and tailoring an instance of the <A HREF="../../../../net/sf/saxon/sxpath/IndependentContext.html" title="class in net.sf.saxon.sxpath"><CODE>IndependentContext</CODE></A> class.
 Until this method is called, a default static context is used, in which no namespaces are defined
 other than the standard ones (xml, xslt, and saxon), and no variables or functions (other than the
 core XPath functions) are available.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>context</CODE> - the XPath static context
 <p>Setting a new static context clears any variables and namespaces that have previously been declared.</p></DL>
</DD>
</DL>
<HR>

<A NAME="getStaticContext()"><!-- --></A><H3>
getStaticContext</H3>
<PRE>
public <A HREF="../../../../net/sf/saxon/sxpath/XPathStaticContext.html" title="interface in net.sf.saxon.sxpath">XPathStaticContext</A> <B>getStaticContext</B>()</PRE>
<DL>
<DD>Get the current static context. This will always return a value; if no static context has been
 supplied by the user, the system will have created its own. A system-created static context
 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>
<DD><DL>

<DT><B>Returns:</B><DD>the static context object</DL>
</DD>
</DL>
<HR>

<A NAME="createExpression(java.lang.String)"><!-- --></A><H3>
createExpression</H3>
<PRE>
public <A HREF="../../../../net/sf/saxon/sxpath/XPathExpression.html" title="class in net.sf.saxon.sxpath">XPathExpression</A> <B>createExpression</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)
                                 throws <A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>Prepare (compile) an XPath expression for subsequent evaluation.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>expression</CODE> - The XPath expression to be compiled, supplied as a string.
<DT><B>Returns:</B><DD>an XPathExpression object representing the prepared expression
<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 syntax of the expression is wrong, or if it references namespaces,
 variables, or functions that have not been declared.</DL>
</DD>
</DL>
<HR>

<A NAME="createPattern(java.lang.String)"><!-- --></A><H3>
createPattern</H3>
<PRE>
public <A HREF="../../../../net/sf/saxon/sxpath/XPathExpression.html" title="class in net.sf.saxon.sxpath">XPathExpression</A> <B>createPattern</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;pattern)
                              throws <A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>Prepare (compile) an XSLT pattern for subsequent evaluation. The result is an XPathExpression
 object representing a (pseudo-) expression that when evaluated returns a boolean result: true
 if the context node matches the pattern, false if it does not.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pattern</CODE> - the XSLT pattern to be compiled, supplied as a string
<DT><B>Returns:</B><DD>an XPathExpression object representing the pattern, wrapped as an expression
<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 syntax of the expression is wrong, or if it references namespaces,
 variables, or functions that have not been declared.<DT><B>Since:</B></DT>
  <DD>9.1</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="setNamespaceResolver(net.sf.saxon.om.NamespaceResolver)"><!-- --></A><H3>
setNamespaceResolver</H3>
<PRE>
public void <B>setNamespaceResolver</B>(<A HREF="../../../../net/sf/saxon/om/NamespaceResolver.html" title="interface in net.sf.saxon.om">NamespaceResolver</A>&nbsp;namespaceResolver)</PRE>
<DL>
<DD>Set the external namespace resolver to be used. The NamespaceResolver is stored
 as part of the static context. It overrides any namespaces declared directly
 using declareNamespace on the staticContext object
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>namespaceResolver</CODE> - The namespace resolver, which maintains a mapping of prefixes to URIs.
 Any namespace prefix used in the XPath expression is resolved using this namespaceResolver.</DL>
</DD>
</DL>
<HR>

<A NAME="getNamespaceResolver()"><!-- --></A><H3>
getNamespaceResolver</H3>
<PRE>
public <A HREF="../../../../net/sf/saxon/om/NamespaceResolver.html" title="interface in net.sf.saxon.om">NamespaceResolver</A> <B>getNamespaceResolver</B>()</PRE>
<DL>
<DD>Get the external namespace resolver, if one has been set using <A HREF="../../../../net/sf/saxon/sxpath/XPathEvaluator.html#setNamespaceResolver(net.sf.saxon.om.NamespaceResolver)"><CODE>setNamespaceResolver(net.sf.saxon.om.NamespaceResolver)</CODE></A>
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the namespace resolver supplied by the user if set, or a system-defined namespace resolver
 otherwise. By default, the <A HREF="../../../../net/sf/saxon/sxpath/IndependentContext.html" title="class in net.sf.saxon.sxpath"><CODE>IndependentContext</CODE></A> object used as the <A HREF="../../../../net/sf/saxon/sxpath/XPathStaticContext.html" title="interface in net.sf.saxon.sxpath"><CODE>XPathStaticContext</CODE></A>
 also acts as the <A HREF="../../../../net/sf/saxon/om/NamespaceResolver.html" title="interface in net.sf.saxon.om"><CODE>NamespaceResolver</CODE></A>.</DL>
</DD>
</DL>
<HR>

<A NAME="setDefaultElementNamespace(java.lang.String)"><!-- --></A><H3>
setDefaultElementNamespace</H3>
<PRE>
public void <B>setDefaultElementNamespace</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>Set the default namespace for elements and types
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>uri</CODE> - The namespace to be used to qualify unprefixed element names and type names appearing
 in the XPath expression.</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/sxpath/XPathDynamicContext.html" title="class in net.sf.saxon.sxpath"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../net/sf/saxon/sxpath/XPathExpression.html" title="class in net.sf.saxon.sxpath"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?net/sf/saxon/sxpath/XPathEvaluator.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="XPathEvaluator.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>