[xsl] Re: RE: templates with optional paramters

Subject: [xsl] Re: RE: templates with optional paramters
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Fri, 22 Mar 2002 10:55:31 -0800 (PST)
> The only way you can determine whether a parameter was actually 
> supplied on the call is by testing whether the value is different 
> from the default value. If the caller supplied the default value, you

> can't tell whether it was supplied explicitly or defaulted. 

This is not true, because even if a parameter has the default value,
there's no guarantee that the caller did not specify the default value.

A better approach exists in the case of XSLT functional programming.
This is to curry the template and produce its partial application. Then
whoever calls the partial application of the function has specified
just the second (unbound) parameter.

Among other significant, important and very powerful features of
partial application, it may also result in gaining efficiency, by not
having to pass the already bound parameters when the partial
application is applied (more than once).

Currying and partial application are implemented in the FXSL functional
programming library.

Cheers,

Dimitre Novatchev. 



__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread