On Wed, Jul 11, 2012 at 9:42 AM, Michael Kay <mike(_at_)saxonica(_dot_)com>
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).
--~------------------------------------------------------------------
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>
--~--