<!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.5.0_18) on Sun Apr 01 21:18:05 PDT 2012 --> | |
<TITLE> | |
ExsltDynamic | |
</TITLE> | |
<META NAME="keywords" CONTENT="org.apache.xalan.lib.ExsltDynamic class"> | |
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> | |
<SCRIPT type="text/javascript"> | |
function windowTitle() | |
{ | |
parent.document.title="ExsltDynamic"; | |
} | |
</SCRIPT> | |
<NOSCRIPT> | |
</NOSCRIPT> | |
</HEAD> | |
<BODY BGCOLOR="white" onload="windowTitle();"> | |
<!-- ========= 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="class-use/ExsltDynamic.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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="../../../../org/apache/xalan/lib/ExsltDatetime.html" title="class in org.apache.xalan.lib"><B>PREV CLASS</B></A> | |
<A HREF="../../../../org/apache/xalan/lib/ExsltMath.html" title="class in org.apache.xalan.lib"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../index.html?org/apache/xalan/lib/ExsltDynamic.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="ExsltDynamic.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 | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: <A HREF="#field_detail">FIELD</A> | <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"> | |
org.apache.xalan.lib</FONT> | |
<BR> | |
Class ExsltDynamic</H2> | |
<PRE> | |
java.lang.Object | |
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../org/apache/xalan/lib/ExsltBase.html" title="class in org.apache.xalan.lib">org.apache.xalan.lib.ExsltBase</A> | |
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.xalan.lib.ExsltDynamic</B> | |
</PRE> | |
<HR> | |
<DL> | |
<DT><PRE>public class <A HREF="../../../../src-html/org/apache/xalan/lib/ExsltDynamic.html#line.61"><B>ExsltDynamic</B></A><DT>extends <A HREF="../../../../org/apache/xalan/lib/ExsltBase.html" title="class in org.apache.xalan.lib">ExsltBase</A></DL> | |
</PRE> | |
<P> | |
This class contains EXSLT dynamic extension functions. | |
It is accessed by specifying a namespace URI as follows: | |
<pre> | |
xmlns:dyn="http://exslt.org/dynamic" | |
</pre> | |
The documentation for each function has been copied from the relevant | |
EXSLT Implementer page. | |
<P> | |
<P> | |
<DL> | |
<DT><B>See Also:</B><DD><a href="http://www.exslt.org/">EXSLT</a></DL> | |
<HR> | |
<P> | |
<!-- =========== FIELD SUMMARY =========== --> | |
<A NAME="field_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>Field Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/xalan/lib/ExsltDynamic.html#EXSL_URI">EXSL_URI</A></B></CODE> | |
<BR> | |
</TD> | |
</TR> | |
</TABLE> | |
| |
<!-- ======== 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="../../../../org/apache/xalan/lib/ExsltDynamic.html#ExsltDynamic()">ExsltDynamic</A></B>()</CODE> | |
<BR> | |
</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>static org.w3c.dom.NodeList</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/xalan/lib/ExsltDynamic.html#closure(org.apache.xalan.extensions.ExpressionContext, org.w3c.dom.NodeList, java.lang.String)">closure</A></B>(<A HREF="../../../../org/apache/xalan/extensions/ExpressionContext.html" title="interface in org.apache.xalan.extensions">ExpressionContext</A> myContext, | |
org.w3c.dom.NodeList nl, | |
java.lang.String expr)</CODE> | |
<BR> | |
The dyn:closure function creates a node set resulting from transitive closure of | |
evaluating the expression passed as the second argument on each of the nodes passed | |
as the first argument, then on the node set resulting from that and so on until no | |
more nodes are found.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static <A HREF="../../../../org/apache/xpath/objects/XObject.html" title="class in org.apache.xpath.objects">XObject</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/xalan/lib/ExsltDynamic.html#evaluate(org.apache.xalan.extensions.ExpressionContext, java.lang.String)">evaluate</A></B>(<A HREF="../../../../org/apache/xalan/extensions/ExpressionContext.html" title="interface in org.apache.xalan.extensions">ExpressionContext</A> myContext, | |
java.lang.String xpathExpr)</CODE> | |
<BR> | |
The dyn:evaluate function evaluates a string as an XPath expression and returns | |
the resulting value, which might be a boolean, number, string, node set, result | |
tree fragment or external object.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static org.w3c.dom.NodeList</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/xalan/lib/ExsltDynamic.html#map(org.apache.xalan.extensions.ExpressionContext, org.w3c.dom.NodeList, java.lang.String)">map</A></B>(<A HREF="../../../../org/apache/xalan/extensions/ExpressionContext.html" title="interface in org.apache.xalan.extensions">ExpressionContext</A> myContext, | |
org.w3c.dom.NodeList nl, | |
java.lang.String expr)</CODE> | |
<BR> | |
The dyn:map function evaluates the expression passed as the second argument for | |
each of the nodes passed as the first argument, and returns a node set of those values.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static double</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/xalan/lib/ExsltDynamic.html#max(org.apache.xalan.extensions.ExpressionContext, org.w3c.dom.NodeList, java.lang.String)">max</A></B>(<A HREF="../../../../org/apache/xalan/extensions/ExpressionContext.html" title="interface in org.apache.xalan.extensions">ExpressionContext</A> myContext, | |
org.w3c.dom.NodeList nl, | |
java.lang.String expr)</CODE> | |
<BR> | |
The dyn:max function calculates the maximum value for the nodes passed as | |
the first argument, where the value of each node is calculated dynamically | |
using an XPath expression passed as a string as the second argument.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static double</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/xalan/lib/ExsltDynamic.html#min(org.apache.xalan.extensions.ExpressionContext, org.w3c.dom.NodeList, java.lang.String)">min</A></B>(<A HREF="../../../../org/apache/xalan/extensions/ExpressionContext.html" title="interface in org.apache.xalan.extensions">ExpressionContext</A> myContext, | |
org.w3c.dom.NodeList nl, | |
java.lang.String expr)</CODE> | |
<BR> | |
The dyn:min function calculates the minimum value for the nodes passed as the | |
first argument, where the value of each node is calculated dynamically using | |
an XPath expression passed as a string as the second argument.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static double</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/xalan/lib/ExsltDynamic.html#sum(org.apache.xalan.extensions.ExpressionContext, org.w3c.dom.NodeList, java.lang.String)">sum</A></B>(<A HREF="../../../../org/apache/xalan/extensions/ExpressionContext.html" title="interface in org.apache.xalan.extensions">ExpressionContext</A> myContext, | |
org.w3c.dom.NodeList nl, | |
java.lang.String expr)</CODE> | |
<BR> | |
The dyn:sum function calculates the sum for the nodes passed as the first argument, | |
where the value of each node is calculated dynamically using an XPath expression | |
passed as a string as the second argument.</TD> | |
</TR> | |
</TABLE> | |
<A NAME="methods_inherited_from_class_org.apache.xalan.lib.ExsltBase"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> | |
<TH ALIGN="left"><B>Methods inherited from class org.apache.xalan.lib.<A HREF="../../../../org/apache/xalan/lib/ExsltBase.html" title="class in org.apache.xalan.lib">ExsltBase</A></B></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><A HREF="../../../../org/apache/xalan/lib/ExsltBase.html#toNumber(org.w3c.dom.Node)">toNumber</A>, <A HREF="../../../../org/apache/xalan/lib/ExsltBase.html#toString(org.w3c.dom.Node)">toString</A></CODE></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.Object</B></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> | |
</TR> | |
</TABLE> | |
| |
<P> | |
<!-- ============ FIELD DETAIL =========== --> | |
<A NAME="field_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>Field Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="EXSL_URI"><!-- --></A><H3> | |
EXSL_URI</H3> | |
<PRE> | |
public static final java.lang.String <A HREF="../../../../src-html/org/apache/xalan/lib/ExsltDynamic.html#line.64"><B>EXSL_URI</B></A></PRE> | |
<DL> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.xalan.lib.ExsltDynamic.EXSL_URI">Constant Field Values</A></DL> | |
</DL> | |
<!-- ========= 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="ExsltDynamic()"><!-- --></A><H3> | |
ExsltDynamic</H3> | |
<PRE> | |
public <A HREF="../../../../src-html/org/apache/xalan/lib/ExsltDynamic.html#line.61"><B>ExsltDynamic</B></A>()</PRE> | |
<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="max(org.apache.xalan.extensions.ExpressionContext, org.w3c.dom.NodeList, java.lang.String)"><!-- --></A><H3> | |
max</H3> | |
<PRE> | |
public static double <A HREF="../../../../src-html/org/apache/xalan/lib/ExsltDynamic.html#line.99"><B>max</B></A>(<A HREF="../../../../org/apache/xalan/extensions/ExpressionContext.html" title="interface in org.apache.xalan.extensions">ExpressionContext</A> myContext, | |
org.w3c.dom.NodeList nl, | |
java.lang.String expr) | |
throws org.xml.sax.SAXNotSupportedException</PRE> | |
<DL> | |
<DD>The dyn:max function calculates the maximum value for the nodes passed as | |
the first argument, where the value of each node is calculated dynamically | |
using an XPath expression passed as a string as the second argument. | |
<p> | |
The expressions are evaluated relative to the nodes passed as the first argument. | |
In other words, the value for each node is calculated by evaluating the XPath | |
expression with all context information being the same as that for the call to | |
the dyn:max function itself, except for the following: | |
<p> | |
<ul> | |
<li>the context node is the node whose value is being calculated.</li> | |
<li>the context position is the position of the node within the node set passed as | |
the first argument to the dyn:max function, arranged in document order.</li> | |
<li>the context size is the number of nodes passed as the first argument to the | |
dyn:max function.</li> | |
</ul> | |
<p> | |
The dyn:max function returns the maximum of these values, calculated in exactly | |
the same way as for math:max. | |
<p> | |
If the expression string passed as the second argument is an invalid XPath | |
expression (including an empty string), this function returns NaN. | |
<p> | |
This function must take a second argument. To calculate the maximum of a set of | |
nodes based on their string values, you should use the math:max function. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>myContext</CODE> - The ExpressionContext passed by the extension processor<DD><CODE>nl</CODE> - The node set<DD><CODE>expr</CODE> - The expression string | |
<DT><B>Returns:</B><DD>The maximum evaluation value | |
<DT><B>Throws:</B> | |
<DD><CODE>org.xml.sax.SAXNotSupportedException</CODE></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="min(org.apache.xalan.extensions.ExpressionContext, org.w3c.dom.NodeList, java.lang.String)"><!-- --></A><H3> | |
min</H3> | |
<PRE> | |
public static double <A HREF="../../../../src-html/org/apache/xalan/lib/ExsltDynamic.html#line.180"><B>min</B></A>(<A HREF="../../../../org/apache/xalan/extensions/ExpressionContext.html" title="interface in org.apache.xalan.extensions">ExpressionContext</A> myContext, | |
org.w3c.dom.NodeList nl, | |
java.lang.String expr) | |
throws org.xml.sax.SAXNotSupportedException</PRE> | |
<DL> | |
<DD>The dyn:min function calculates the minimum value for the nodes passed as the | |
first argument, where the value of each node is calculated dynamically using | |
an XPath expression passed as a string as the second argument. | |
<p> | |
The expressions are evaluated relative to the nodes passed as the first argument. | |
In other words, the value for each node is calculated by evaluating the XPath | |
expression with all context information being the same as that for the call to | |
the dyn:min function itself, except for the following: | |
<p> | |
<ul> | |
<li>the context node is the node whose value is being calculated.</li> | |
<li>the context position is the position of the node within the node set passed | |
as the first argument to the dyn:min function, arranged in document order.</li> | |
<li>the context size is the number of nodes passed as the first argument to the | |
dyn:min function.</li> | |
</ul> | |
<p> | |
The dyn:min function returns the minimum of these values, calculated in exactly | |
the same way as for math:min. | |
<p> | |
If the expression string passed as the second argument is an invalid XPath expression | |
(including an empty string), this function returns NaN. | |
<p> | |
This function must take a second argument. To calculate the minimum of a set of | |
nodes based on their string values, you should use the math:min function. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>myContext</CODE> - The ExpressionContext passed by the extension processor<DD><CODE>nl</CODE> - The node set<DD><CODE>expr</CODE> - The expression string | |
<DT><B>Returns:</B><DD>The minimum evaluation value | |
<DT><B>Throws:</B> | |
<DD><CODE>org.xml.sax.SAXNotSupportedException</CODE></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="sum(org.apache.xalan.extensions.ExpressionContext, org.w3c.dom.NodeList, java.lang.String)"><!-- --></A><H3> | |
sum</H3> | |
<PRE> | |
public static double <A HREF="../../../../src-html/org/apache/xalan/lib/ExsltDynamic.html#line.261"><B>sum</B></A>(<A HREF="../../../../org/apache/xalan/extensions/ExpressionContext.html" title="interface in org.apache.xalan.extensions">ExpressionContext</A> myContext, | |
org.w3c.dom.NodeList nl, | |
java.lang.String expr) | |
throws org.xml.sax.SAXNotSupportedException</PRE> | |
<DL> | |
<DD>The dyn:sum function calculates the sum for the nodes passed as the first argument, | |
where the value of each node is calculated dynamically using an XPath expression | |
passed as a string as the second argument. | |
<p> | |
The expressions are evaluated relative to the nodes passed as the first argument. | |
In other words, the value for each node is calculated by evaluating the XPath | |
expression with all context information being the same as that for the call to | |
the dyn:sum function itself, except for the following: | |
<p> | |
<ul> | |
<li>the context node is the node whose value is being calculated.</li> | |
<li>the context position is the position of the node within the node set passed as | |
the first argument to the dyn:sum function, arranged in document order.</li> | |
<li>the context size is the number of nodes passed as the first argument to the | |
dyn:sum function.</li> | |
</ul> | |
<p> | |
The dyn:sum function returns the sumimum of these values, calculated in exactly | |
the same way as for sum. | |
<p> | |
If the expression string passed as the second argument is an invalid XPath | |
expression (including an empty string), this function returns NaN. | |
<p> | |
This function must take a second argument. To calculate the sumimum of a set of | |
nodes based on their string values, you should use the sum function. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>myContext</CODE> - The ExpressionContext passed by the extension processor<DD><CODE>nl</CODE> - The node set<DD><CODE>expr</CODE> - The expression string | |
<DT><B>Returns:</B><DD>The sum of the evaluation value on each node | |
<DT><B>Throws:</B> | |
<DD><CODE>org.xml.sax.SAXNotSupportedException</CODE></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="map(org.apache.xalan.extensions.ExpressionContext, org.w3c.dom.NodeList, java.lang.String)"><!-- --></A><H3> | |
map</H3> | |
<PRE> | |
public static org.w3c.dom.NodeList <A HREF="../../../../src-html/org/apache/xalan/lib/ExsltDynamic.html#line.363"><B>map</B></A>(<A HREF="../../../../org/apache/xalan/extensions/ExpressionContext.html" title="interface in org.apache.xalan.extensions">ExpressionContext</A> myContext, | |
org.w3c.dom.NodeList nl, | |
java.lang.String expr) | |
throws org.xml.sax.SAXNotSupportedException</PRE> | |
<DL> | |
<DD>The dyn:map function evaluates the expression passed as the second argument for | |
each of the nodes passed as the first argument, and returns a node set of those values. | |
<p> | |
The expressions are evaluated relative to the nodes passed as the first argument. | |
In other words, the value for each node is calculated by evaluating the XPath | |
expression with all context information being the same as that for the call to | |
the dyn:map function itself, except for the following: | |
<p> | |
<ul> | |
<li>The context node is the node whose value is being calculated.</li> | |
<li>the context position is the position of the node within the node set passed | |
as the first argument to the dyn:map function, arranged in document order.</li> | |
<li>the context size is the number of nodes passed as the first argument to the | |
dyn:map function.</li> | |
</ul> | |
<p> | |
If the expression string passed as the second argument is an invalid XPath | |
expression (including an empty string), this function returns an empty node set. | |
<p> | |
If the XPath expression evaluates as a node set, the dyn:map function returns | |
the union of the node sets returned by evaluating the expression for each of the | |
nodes in the first argument. Note that this may mean that the node set resulting | |
from the call to the dyn:map function contains a different number of nodes from | |
the number in the node set passed as the first argument to the function. | |
<p> | |
If the XPath expression evaluates as a number, the dyn:map function returns a | |
node set containing one exsl:number element (namespace http://exslt.org/common) | |
for each node in the node set passed as the first argument to the dyn:map function, | |
in document order. The string value of each exsl:number element is the same as | |
the result of converting the number resulting from evaluating the expression to | |
a string as with the number function, with the exception that Infinity results | |
in an exsl:number holding the highest number the implementation can store, and | |
-Infinity results in an exsl:number holding the lowest number the implementation | |
can store. | |
<p> | |
If the XPath expression evaluates as a boolean, the dyn:map function returns a | |
node set containing one exsl:boolean element (namespace http://exslt.org/common) | |
for each node in the node set passed as the first argument to the dyn:map function, | |
in document order. The string value of each exsl:boolean element is 'true' if the | |
expression evaluates as true for the node, and '' if the expression evaluates as | |
false. | |
<p> | |
Otherwise, the dyn:map function returns a node set containing one exsl:string | |
element (namespace http://exslt.org/common) for each node in the node set passed | |
as the first argument to the dyn:map function, in document order. The string | |
value of each exsl:string element is the same as the result of converting the | |
result of evaluating the expression for the relevant node to a string as with | |
the string function. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>myContext</CODE> - The ExpressionContext passed by the extension processor<DD><CODE>nl</CODE> - The node set<DD><CODE>expr</CODE> - The expression string | |
<DT><B>Returns:</B><DD>The node set after evaluation | |
<DT><B>Throws:</B> | |
<DD><CODE>org.xml.sax.SAXNotSupportedException</CODE></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="evaluate(org.apache.xalan.extensions.ExpressionContext, java.lang.String)"><!-- --></A><H3> | |
evaluate</H3> | |
<PRE> | |
public static <A HREF="../../../../org/apache/xpath/objects/XObject.html" title="class in org.apache.xpath.objects">XObject</A> <A HREF="../../../../src-html/org/apache/xalan/lib/ExsltDynamic.html#line.462"><B>evaluate</B></A>(<A HREF="../../../../org/apache/xalan/extensions/ExpressionContext.html" title="interface in org.apache.xalan.extensions">ExpressionContext</A> myContext, | |
java.lang.String xpathExpr) | |
throws org.xml.sax.SAXNotSupportedException</PRE> | |
<DL> | |
<DD>The dyn:evaluate function evaluates a string as an XPath expression and returns | |
the resulting value, which might be a boolean, number, string, node set, result | |
tree fragment or external object. The sole argument is the string to be evaluated. | |
<p> | |
If the expression string passed as the second argument is an invalid XPath | |
expression (including an empty string), this function returns an empty node set. | |
<p> | |
You should only use this function if the expression must be constructed dynamically, | |
otherwise it is much more efficient to use the expression literally. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>myContext</CODE> - The ExpressionContext passed by the extension processor<DD><CODE>xpathExpr</CODE> - The XPath expression string | |
<DT><B>Returns:</B><DD>The evaluation result | |
<DT><B>Throws:</B> | |
<DD><CODE>org.xml.sax.SAXNotSupportedException</CODE></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="closure(org.apache.xalan.extensions.ExpressionContext, org.w3c.dom.NodeList, java.lang.String)"><!-- --></A><H3> | |
closure</H3> | |
<PRE> | |
public static org.w3c.dom.NodeList <A HREF="../../../../src-html/org/apache/xalan/lib/ExsltDynamic.html#line.530"><B>closure</B></A>(<A HREF="../../../../org/apache/xalan/extensions/ExpressionContext.html" title="interface in org.apache.xalan.extensions">ExpressionContext</A> myContext, | |
org.w3c.dom.NodeList nl, | |
java.lang.String expr) | |
throws org.xml.sax.SAXNotSupportedException</PRE> | |
<DL> | |
<DD>The dyn:closure function creates a node set resulting from transitive closure of | |
evaluating the expression passed as the second argument on each of the nodes passed | |
as the first argument, then on the node set resulting from that and so on until no | |
more nodes are found. For example: | |
<pre> | |
dyn:closure(., '*') | |
</pre> | |
returns all the descendant elements of the node (its element children, their | |
children, their children's children and so on). | |
<p> | |
The expression is thus evaluated several times, each with a different node set | |
acting as the context of the expression. The first time the expression is | |
evaluated, the context node set is the first argument passed to the dyn:closure | |
function. In other words, the node set for each node is calculated by evaluating | |
the XPath expression with all context information being the same as that for | |
the call to the dyn:closure function itself, except for the following: | |
<p> | |
<ul> | |
<li>the context node is the node whose value is being calculated.</li> | |
<li>the context position is the position of the node within the node set passed | |
as the first argument to the dyn:closure function, arranged in document order.</li> | |
<li>the context size is the number of nodes passed as the first argument to the | |
dyn:closure function.</li> | |
<li>the current node is the node whose value is being calculated.</li> | |
</ul> | |
<p> | |
The result for a particular iteration is the union of the node sets resulting | |
from evaluting the expression for each of the nodes in the source node set for | |
that iteration. This result is then used as the source node set for the next | |
iteration, and so on. The result of the function as a whole is the union of | |
the node sets generated by each iteration. | |
<p> | |
If the expression string passed as the second argument is an invalid XPath | |
expression (including an empty string) or an expression that does not return a | |
node set, this function returns an empty node set. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>myContext</CODE> - The ExpressionContext passed by the extension processor<DD><CODE>nl</CODE> - The node set<DD><CODE>expr</CODE> - The expression string | |
<DT><B>Returns:</B><DD>The node set after evaluation | |
<DT><B>Throws:</B> | |
<DD><CODE>org.xml.sax.SAXNotSupportedException</CODE></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="class-use/ExsltDynamic.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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="../../../../org/apache/xalan/lib/ExsltDatetime.html" title="class in org.apache.xalan.lib"><B>PREV CLASS</B></A> | |
<A HREF="../../../../org/apache/xalan/lib/ExsltMath.html" title="class in org.apache.xalan.lib"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../index.html?org/apache/xalan/lib/ExsltDynamic.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="ExsltDynamic.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 | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: <A HREF="#field_detail">FIELD</A> | <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> | |
</BODY> | |
</HTML> |