On Wed, Jul 11, 2012 at 11:31 AM, Michael Kay <mike@xxxxxxxxxxxx> 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
|