RE: Esoteric XSLT/FXSL question
> Now, the FP alphabet of functions includes as its signature > functions, "map", "fold" (aka "reduce") and so on. > > However "so on" rarely includes "foreach" as a signature > function of the FP idiom. Is this because "foreach" implies > some kind of time ordered calculation, and therefore not optimizable? xsl:for-each is essentially a map() or apply() function. More specifically <xsl:for-each select="S"> <instructions/> </xsl:for-each> is equivalent to the higher-order function call map(S, instructions) where "instructions" is interpreted as a function applied to the context node. The use of the English words "for each" is a mixed blessing. On the one hand, it makes your typical user less uncomfortable than if it were named xsl:map. On the other hand, it gives people the wrong impression that it is procedural. Michael Kay http://www.saxonica.com/
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