|
Subject: Re: [xsl] New XSLT 3.0 Working Draft From: Ihe Onwuka <ihe.onwuka@xxxxxxxxxxxxxx> Date: Wed, 11 Jul 2012 10:12:53 +0100 |
On Wed, Jul 11, 2012 at 9:42 AM, Michael Kay <mike@xxxxxxxxxxxx> wrote:
>> Given the way unsupplied parameters are currently treated will we have
>> partial evaluation ?
>
Reference to unsupplied parameters - I was thinking of the treatment
of unsupplied parameters in template definitions - which mitigate
against partial applications.
> Yes, partial evaluation is available. For example:
>
> <xsl:variable name="f" as="function(xs:string) as xs:boolean"
> select="contains(?, 'a')"/>
> <xsl:if test="$f('abracadabra')">...</xsl:if>
>
> returns true
Sorry I meant partial application and you must forgive my syntax
because I have no idea what it should be but in
<xsl:variable name="f" as="function(xs:integer, xs:integer) as
xs:integer" select="1"/>
if the function in the above variable is a function that adds two
integers then $f(3) returns 4 (i.e $f becomes a function that
increments it's argument by 1).
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] New XSLT 3.0 Working Draf, Michael Kay | Thread | Re: [xsl] New XSLT 3.0 Working Draf, Michael Kay |
| Re: [xsl] New XSLT 3.0 Working Draf, Michael Kay | Date | Re: [xsl] New XSLT 3.0 Working Draf, Michael Kay |
| Month |