On Wed, Jul 11, 2012 at 11:31 AM, Michael Kay <mike(_at_)saxonica(_dot_)com>
wrote:
If f is a function that takes two arguments and adds them, so that f(2,3) is
5, then f(?,1) is a function that takes a single argument and adds one to
it.
You might write this as
<xsl:variable name="fAdd"
select="function($x as xs:integer, $y as xs:integer) as xs:integer {$x +
$y}"/>
<xsl:variable name="fIncrement" select="$fAdd(?, 1)"/>
<xsl:value-of select="$fIncrement(4)"/>
which would output "5".
Ah hah..... ? stands for an unsupplied argument. Cheers.
Michael Kay
Saxonica
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--