Re: Functional programming in XSLT (revised)
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
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