Subject: RE: [xsl] Functional programming in XSLT From: "Michael Kay" <mhkay@xxxxxxxxxxxx> Date: Mon, 12 Mar 2001 10:05:59 -0000 |
> XSLT is frequently called a functional programming language. However, > few important constructions common for functional languages > are missing > in XSLT. > > At my opinion, adding the following features to XSLT could > make it more suitable for the functional programming. I went through the same thought processes myself when I introduced saxon:function, which has led to so much (constructive) discussion on this list recently. But I decided that full lambda expressions were over-the-top, 95% of the requirement could be met with the concept I called "stored expressions" in Saxon, which is essentially a lambda expression that takes the context node as its only argument. I'm not sure why the syntax you're proposing is different from the "exsl:function" syntax that's been raging on this list for the last few weeks. The other interesting debate is whether such things are best done at the XSLT or XPath level: Saxon does stored expressions at the XPath level, and the FXPath proposal does user-defined functions at this level too (sorry, don't have the URLs handy). Mike Kay Software AG > > > 1. Lambda-elements > ------------------ > > Defines anonymous functions, which may be passed to another > functions as parameters. > > > 2. User-defined functions > ------------------------- > > Syntax: > > <xsl:define name="qname"> > <xsl:param ...> > <xsl:param ...> > . . . > <xsl:return> > </xsl:define> > > The xsl:define element defines the extension function with the name > "qname". > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Functional programming in, David Rosenborg | Thread | Re: [xsl] Functional programming in, Alexey Gokhberg |
RE: [xsl] How to specify a path to , Michael Kay | Date | Re: [xsl] How to test a given node , David Carlisle |
Month |