<!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> XQueryFunctionLibrary </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="XQueryFunctionLibrary"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../net/sf/saxon/query/XQueryFunctionBinder.html" title="interface in net.sf.saxon.query"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?net/sf/saxon/query/XQueryFunctionLibrary.html" target="_top"><B>FRAMES</B></A> <A HREF="XQueryFunctionLibrary.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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 XQueryFunctionLibrary</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.XQueryFunctionLibrary</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="../../../../net/sf/saxon/functions/FunctionLibrary.html" title="interface in net.sf.saxon.functions">FunctionLibrary</A>, <A HREF="../../../../net/sf/saxon/query/XQueryFunctionBinder.html" title="interface in net.sf.saxon.query">XQueryFunctionBinder</A></DD> </DL> <HR> <DL> <DT><PRE>public class <B>XQueryFunctionLibrary</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/functions/FunctionLibrary.html" title="interface in net.sf.saxon.functions">FunctionLibrary</A>, <A HREF="../../../../net/sf/saxon/query/XQueryFunctionBinder.html" title="interface in net.sf.saxon.query">XQueryFunctionBinder</A></DL> </PRE> <P> An XQueryFunctionLibrary is a function library containing all the user-defined functions available for use within a particular XQuery module: that is, the functions declared in that module, and the functions imported from other modules. It also contains (transiently during compilation) a list of function calls within the module that have not yet been bound to a specific function declaration. <P> <P> <DL> <DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#net.sf.saxon.query.XQueryFunctionLibrary">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><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryFunctionLibrary.html#XQueryFunctionLibrary(net.sf.saxon.Configuration)">XQueryFunctionLibrary</A></B>(<A HREF="../../../../net/sf/saxon/Configuration.html" title="class in net.sf.saxon">Configuration</A> config)</CODE> <BR> Create an XQueryFunctionLibrary</TD> </TR> </TABLE> <!-- ========== 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> <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/XQueryFunctionLibrary.html#bind(net.sf.saxon.om.StructuredQName, net.sf.saxon.expr.Expression[], net.sf.saxon.expr.StaticContext, net.sf.saxon.expr.Container)">bind</A></B>(<A HREF="../../../../net/sf/saxon/om/StructuredQName.html" title="class in net.sf.saxon.om">StructuredQName</A> functionName, <A HREF="../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>[] arguments, <A HREF="../../../../net/sf/saxon/expr/StaticContext.html" title="interface in net.sf.saxon.expr">StaticContext</A> env, <A HREF="../../../../net/sf/saxon/expr/Container.html" title="interface in net.sf.saxon.expr">Container</A> container)</CODE> <BR> Identify a (namespace-prefixed) function appearing in the expression.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../net/sf/saxon/functions/FunctionLibrary.html" title="interface in net.sf.saxon.functions">FunctionLibrary</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryFunctionLibrary.html#copy()">copy</A></B>()</CODE> <BR> This method creates a copy of a FunctionLibrary: if the original FunctionLibrary allows new functions to be added, then additions to this copy will not affect the original, or vice versa.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryFunctionLibrary.html#declareFunction(net.sf.saxon.query.XQueryFunction)">declareFunction</A></B>(<A HREF="../../../../net/sf/saxon/query/XQueryFunction.html" title="class in net.sf.saxon.query">XQueryFunction</A> function)</CODE> <BR> Register a user-defined XQuery function</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryFunctionLibrary.html#explainGlobalFunctions(net.sf.saxon.trace.ExpressionPresenter)">explainGlobalFunctions</A></B>(<A HREF="../../../../net/sf/saxon/trace/ExpressionPresenter.html" title="class in net.sf.saxon.trace">ExpressionPresenter</A> out)</CODE> <BR> Output "explain" information about each declared function</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryFunctionLibrary.html#fixupGlobalFunctions(net.sf.saxon.query.QueryModule)">fixupGlobalFunctions</A></B>(<A HREF="../../../../net/sf/saxon/query/QueryModule.html" title="class in net.sf.saxon.query">QueryModule</A> env)</CODE> <BR> Fixup all references to global functions.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <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/query/XQueryFunctionLibrary.html#getConfiguration()">getConfiguration</A></B>()</CODE> <BR> Get the Configuration options</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../net/sf/saxon/query/XQueryFunction.html" title="class in net.sf.saxon.query">XQueryFunction</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryFunctionLibrary.html#getDeclaration(net.sf.saxon.om.StructuredQName, net.sf.saxon.expr.Expression[])">getDeclaration</A></B>(<A HREF="../../../../net/sf/saxon/om/StructuredQName.html" title="class in net.sf.saxon.om">StructuredQName</A> functionName, <A HREF="../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>[] staticArgs)</CODE> <BR> Get the function declaration corresponding to a given function name and arity</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../net/sf/saxon/query/XQueryFunction.html" title="class in net.sf.saxon.query">XQueryFunction</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryFunctionLibrary.html#getDeclarationByKey(java.lang.String)">getDeclarationByKey</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> functionKey)</CODE> <BR> Get the function declaration corresponding to a given function name and arity, supplied in the form "{uri}local/arity"</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A><<A HREF="../../../../net/sf/saxon/query/XQueryFunction.html" title="class in net.sf.saxon.query">XQueryFunction</A>></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryFunctionLibrary.html#getFunctionDefinitions()">getFunctionDefinitions</A></B>()</CODE> <BR> Get an iterator over the Functions defined in this module</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../net/sf/saxon/value/SequenceType.html" title="class in net.sf.saxon.value">SequenceType</A>[]</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryFunctionLibrary.html#getFunctionSignature(net.sf.saxon.om.StructuredQName, int)">getFunctionSignature</A></B>(<A HREF="../../../../net/sf/saxon/om/StructuredQName.html" title="class in net.sf.saxon.om">StructuredQName</A> functionName, int arity)</CODE> <BR> Test whether a function with a given name and arity is available; if so, return its signature.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../net/sf/saxon/expr/instruct/UserFunction.html" title="class in net.sf.saxon.expr.instruct">UserFunction</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryFunctionLibrary.html#getUserDefinedFunction(java.lang.String, java.lang.String, int)">getUserDefinedFunction</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> 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> localName, int arity)</CODE> <BR> Get the function with a given name and arity.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryFunctionLibrary.html#optimizeGlobalFunctions()">optimizeGlobalFunctions</A></B>()</CODE> <BR> Optimize the body of all global functions.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../net/sf/saxon/query/XQueryFunctionLibrary.html#setConfiguration(net.sf.saxon.Configuration)">setConfiguration</A></B>(<A HREF="../../../../net/sf/saxon/Configuration.html" title="class in net.sf.saxon">Configuration</A> config)</CODE> <BR> Set the Configuration options</TD> </TR> </TABLE> <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> <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="XQueryFunctionLibrary(net.sf.saxon.Configuration)"><!-- --></A><H3> XQueryFunctionLibrary</H3> <PRE> public <B>XQueryFunctionLibrary</B>(<A HREF="../../../../net/sf/saxon/Configuration.html" title="class in net.sf.saxon">Configuration</A> config)</PRE> <DL> <DD>Create an XQueryFunctionLibrary <P> <DL> <DT><B>Parameters:</B><DD><CODE>config</CODE> - the Saxon configuration</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="setConfiguration(net.sf.saxon.Configuration)"><!-- --></A><H3> setConfiguration</H3> <PRE> public void <B>setConfiguration</B>(<A HREF="../../../../net/sf/saxon/Configuration.html" title="class in net.sf.saxon">Configuration</A> config)</PRE> <DL> <DD>Set the Configuration options <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>config</CODE> - the Saxon configuration</DL> </DD> </DL> <HR> <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 options <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the Saxon configuration</DL> </DD> </DL> <HR> <A NAME="declareFunction(net.sf.saxon.query.XQueryFunction)"><!-- --></A><H3> declareFunction</H3> <PRE> public void <B>declareFunction</B>(<A HREF="../../../../net/sf/saxon/query/XQueryFunction.html" title="class in net.sf.saxon.query">XQueryFunction</A> function) throws <A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE> <DL> <DD>Register a user-defined XQuery function <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>function</CODE> - the function to be registered <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 there is an existing function with the same name and arity</DL> </DD> </DL> <HR> <A NAME="getFunctionSignature(net.sf.saxon.om.StructuredQName, int)"><!-- --></A><H3> getFunctionSignature</H3> <PRE> public <A HREF="../../../../net/sf/saxon/value/SequenceType.html" title="class in net.sf.saxon.value">SequenceType</A>[] <B>getFunctionSignature</B>(<A HREF="../../../../net/sf/saxon/om/StructuredQName.html" title="class in net.sf.saxon.om">StructuredQName</A> functionName, int arity)</PRE> <DL> <DD>Test whether a function with a given name and arity is available; if so, return its signature. This supports the function-available() function in XSLT; it is also used to support higher-order functions introduced in XQuery 1.1. <p>This method may be called either at compile time or at run time. If the function library is to be used only in an XQuery or free-standing XPath environment, this method may throw an UnsupportedOperationException.</p> <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/sf/saxon/functions/FunctionLibrary.html#getFunctionSignature(net.sf.saxon.om.StructuredQName, int)">getFunctionSignature</A></CODE> in interface <CODE><A HREF="../../../../net/sf/saxon/functions/FunctionLibrary.html" title="interface in net.sf.saxon.functions">FunctionLibrary</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>functionName</CODE> - the qualified name of the function being called<DD><CODE>arity</CODE> - The number of arguments. This is set to -1 in the case of the single-argument function-available() function; in this case the method should return true if there is some function of this name available for calling. <DT><B>Returns:</B><DD>if a function of this name and arity is available for calling, then the type signature of the function, as an array of sequence types in which the zeroth entry represents the return type; or a zero-length array if the function exists but the signature is not known; or null if the function does not exist</DL> </DD> </DL> <HR> <A NAME="bind(net.sf.saxon.om.StructuredQName, net.sf.saxon.expr.Expression[], net.sf.saxon.expr.StaticContext, net.sf.saxon.expr.Container)"><!-- --></A><H3> bind</H3> <PRE> public <A HREF="../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A> <B>bind</B>(<A HREF="../../../../net/sf/saxon/om/StructuredQName.html" title="class in net.sf.saxon.om">StructuredQName</A> functionName, <A HREF="../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>[] arguments, <A HREF="../../../../net/sf/saxon/expr/StaticContext.html" title="interface in net.sf.saxon.expr">StaticContext</A> env, <A HREF="../../../../net/sf/saxon/expr/Container.html" title="interface in net.sf.saxon.expr">Container</A> container) throws <A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE> <DL> <DD>Identify a (namespace-prefixed) function appearing in the expression. This method is called by the XQuery parser to resolve function calls found within the query. <p>Note that a function call may appear earlier in the query than the definition of the function to which it is bound. Unlike XSLT, we cannot search forwards to find the function definition. Binding of function calls is therefore a two-stage process; at the time the function call is parsed, we simply register it as pending; subsequently at the end of query parsing all the pending function calls are resolved. Another consequence of this is that we cannot tell at the time a function call is parsed whether it is a call to an internal (XSLT or XQuery) function or to an extension function written in Java. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/sf/saxon/functions/FunctionLibrary.html#bind(net.sf.saxon.om.StructuredQName, net.sf.saxon.expr.Expression[], net.sf.saxon.expr.StaticContext, net.sf.saxon.expr.Container)">bind</A></CODE> in interface <CODE><A HREF="../../../../net/sf/saxon/functions/FunctionLibrary.html" title="interface in net.sf.saxon.functions">FunctionLibrary</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>functionName</CODE> - the QName of the function being called<DD><CODE>arguments</CODE> - The expressions supplied statically in arguments to the function call. The length of this array represents the arity of the function. The intention is that the static type of the arguments (obtainable via getItemType() and getCardinality()) may be used as part of the binding algorithm. In some cases it may be possible for the function to be pre-evaluated at compile time, for example if these expressions are all constant values. <p> The conventions of the XPath language demand that the results of a function depend only on the values of the expressions supplied as arguments, and not on the form of those expressions. For example, the result of f(4) is expected to be the same as f(2+2). The actual expression is supplied here to enable the binding mechanism to select the most efficient possible implementation (including compile-time pre-evaluation where appropriate).<DD><CODE>env</CODE> - The static context of the function call<DD><CODE>container</CODE> - The container for the newly created Expression <DT><B>Returns:</B><DD>an Expression representing the function call. This will normally be a FunctionCall, but it may be rewritten as some other 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 function call is invalid, either because it is an unprefixed call to a non-system function, or because it is calling a system function that is available in XSLT only. A prefixed function call that cannot be recognized at this stage is assumed to be a forwards reference, and is bound later when bindUnboundFunctionCalls() is called.</DL> </DD> </DL> <HR> <A NAME="getDeclaration(net.sf.saxon.om.StructuredQName, net.sf.saxon.expr.Expression[])"><!-- --></A><H3> getDeclaration</H3> <PRE> public <A HREF="../../../../net/sf/saxon/query/XQueryFunction.html" title="class in net.sf.saxon.query">XQueryFunction</A> <B>getDeclaration</B>(<A HREF="../../../../net/sf/saxon/om/StructuredQName.html" title="class in net.sf.saxon.om">StructuredQName</A> functionName, <A HREF="../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>[] staticArgs)</PRE> <DL> <DD>Get the function declaration corresponding to a given function name and arity <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/sf/saxon/query/XQueryFunctionBinder.html#getDeclaration(net.sf.saxon.om.StructuredQName, net.sf.saxon.expr.Expression[])">getDeclaration</A></CODE> in interface <CODE><A HREF="../../../../net/sf/saxon/query/XQueryFunctionBinder.html" title="interface in net.sf.saxon.query">XQueryFunctionBinder</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>functionName</CODE> - the name of the function as a QName<DD><CODE>staticArgs</CODE> - the expressions supplied as arguments in the function call (typically, we only need to know the number of arguments) <DT><B>Returns:</B><DD>the XQueryFunction if there is one, or null if not.</DL> </DD> </DL> <HR> <A NAME="getDeclarationByKey(java.lang.String)"><!-- --></A><H3> getDeclarationByKey</H3> <PRE> public <A HREF="../../../../net/sf/saxon/query/XQueryFunction.html" title="class in net.sf.saxon.query">XQueryFunction</A> <B>getDeclarationByKey</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> functionKey)</PRE> <DL> <DD>Get the function declaration corresponding to a given function name and arity, supplied in the form "{uri}local/arity" <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>functionKey</CODE> - a string in the form "{uri}local/arity" identifying the required function <DT><B>Returns:</B><DD>the XQueryFunction if there is one, or null if not.</DL> </DD> </DL> <HR> <A NAME="getFunctionDefinitions()"><!-- --></A><H3> getFunctionDefinitions</H3> <PRE> public <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A><<A HREF="../../../../net/sf/saxon/query/XQueryFunction.html" title="class in net.sf.saxon.query">XQueryFunction</A>> <B>getFunctionDefinitions</B>()</PRE> <DL> <DD>Get an iterator over the Functions defined in this module <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>an Iterator, whose items are <A HREF="../../../../net/sf/saxon/query/XQueryFunction.html" title="class in net.sf.saxon.query"><CODE>XQueryFunction</CODE></A> objects. It returns all function known to this module including those imported from elsewhere; they can be distinguished by their namespace.</DL> </DD> </DL> <HR> <A NAME="fixupGlobalFunctions(net.sf.saxon.query.QueryModule)"><!-- --></A><H3> fixupGlobalFunctions</H3> <PRE> protected void <B>fixupGlobalFunctions</B>(<A HREF="../../../../net/sf/saxon/query/QueryModule.html" title="class in net.sf.saxon.query">QueryModule</A> env) throws <A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE> <DL> <DD>Fixup all references to global functions. This method is called on completion of query parsing. Each XQueryFunction is required to bind all references to that function to the object representing the run-time executable code of the function. <p> This method is for internal use. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>env</CODE> - the static context for the main query body. <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="optimizeGlobalFunctions()"><!-- --></A><H3> optimizeGlobalFunctions</H3> <PRE> protected void <B>optimizeGlobalFunctions</B>() throws <A HREF="../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE> <DL> <DD>Optimize the body of all global functions. This may involve inlining functions calls <P> <DD><DL> </DL> </DD> <DD><DL> <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="explainGlobalFunctions(net.sf.saxon.trace.ExpressionPresenter)"><!-- --></A><H3> explainGlobalFunctions</H3> <PRE> public void <B>explainGlobalFunctions</B>(<A HREF="../../../../net/sf/saxon/trace/ExpressionPresenter.html" title="class in net.sf.saxon.trace">ExpressionPresenter</A> out)</PRE> <DL> <DD>Output "explain" information about each declared function <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>out</CODE> - the ExpressionPresenter that renders the output</DL> </DD> </DL> <HR> <A NAME="getUserDefinedFunction(java.lang.String, java.lang.String, int)"><!-- --></A><H3> getUserDefinedFunction</H3> <PRE> public <A HREF="../../../../net/sf/saxon/expr/instruct/UserFunction.html" title="class in net.sf.saxon.expr.instruct">UserFunction</A> <B>getUserDefinedFunction</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> 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> localName, int arity)</PRE> <DL> <DD>Get the function with a given name and arity. This method is provided so that XQuery functions can be called directly from a Java application. Note that there is no type checking or conversion of arguments when this is done: the arguments must be provided in exactly the form that the function signature declares them. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>uri</CODE> - the uri of the function name<DD><CODE>localName</CODE> - the local part of the function name<DD><CODE>arity</CODE> - the number of arguments. <DT><B>Returns:</B><DD>the function identified by the URI, local name, and arity; or null if there is no such function</DL> </DD> </DL> <HR> <A NAME="copy()"><!-- --></A><H3> copy</H3> <PRE> public <A HREF="../../../../net/sf/saxon/functions/FunctionLibrary.html" title="interface in net.sf.saxon.functions">FunctionLibrary</A> <B>copy</B>()</PRE> <DL> <DD>This method creates a copy of a FunctionLibrary: if the original FunctionLibrary allows new functions to be added, then additions to this copy will not affect the original, or vice versa. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/sf/saxon/functions/FunctionLibrary.html#copy()">copy</A></CODE> in interface <CODE><A HREF="../../../../net/sf/saxon/functions/FunctionLibrary.html" title="interface in net.sf.saxon.functions">FunctionLibrary</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>a copy of this function library. This must be an instance of the original class.</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../net/sf/saxon/query/XQueryFunctionBinder.html" title="interface in net.sf.saxon.query"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?net/sf/saxon/query/XQueryFunctionLibrary.html" target="_top"><B>FRAMES</B></A> <A HREF="XQueryFunctionLibrary.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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>