RE: [xsl] XPath 1 For Loop

Subject: RE: [xsl] XPath 1 For Loop
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 22 Dec 2008 13:20:36 -0000
> How can I change this to XPath 1 so it works with Xalan 2.7?
> 

With difficulty. The following approaches can be used in XSLT 1.0 to sum a
set of computed values:

(a) create the computed values in a new tree, convert it to a node-set using
xx:node-set(), then sum over the new nodes.

(b) use a recursive scan of the input, accumulating the total as you iterate
over the values

(c) use the appropriate higher-order function as defined in the FXSL
library.

Michael Kay
http://www.saxonica.com/

Current Thread