Re: RE: templates with optional paramters
> 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
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format