Subject: Re: [xsl] Functional programming in XSLT (revised) From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx> Date: Fri, 16 Mar 2001 10:20:04 +0000 |
Hi Alexey, Just a couple of comments. > The <fxsl:function> declarations are allowed at any place, where > <xsl:variable> declarations are allowed. In particular, function > declarations can be top-level or local to a template. Furthermore, > function declarations may be embedded into another function > declarations. I was thinking about this after reading your last proposal - local function declarations in the same way as you get local variables. I quite like it (it has a symmetry) but I couldn't think of why I'd ever need it. Have you got a use case in mind? Or is it to make the lambda thing easier? > 3. Conditional operator in XPath > -------------------------------- > > The conditional operator is added to XPath. The proposed syntax is > > if TEST then CONSEQUENT else ATERNATE > > where "if", "then" and "else" are "reserved words", and "TEST", > "CONSEQUENT" and "ALTERNATE" are XPath expressions. David had this syntax for a while and I bugged him mercilessly about it. He changed it to: if (TEST) then (CONSEQUENT) else (ALTERNATE) when he identified that: if $test then / else /foo would be parsed as: if $test then (/else/foo) and cause an error in the XPath parser despite the fact that it's a perfectly legal conditional operator. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Functional programming in XSL, Alexey Gokhberg | Thread | RE: [xsl] Functional programming in, Michael Kay |
RE: [xsl] new line, Michael Kay | Date | RE: [xsl] Getting System Date from , Michael Kay |
Month |