[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XSLT: SUM function or "+" operator usage problems to dis
> <xsl:variable name="subtotal"> > <xsl:value-of select="$subtotal+number(Price)"> > </xsl:variable> You have fundamentally misunderstood the way XLST variables work, I'm afraid. XSLT is not a sequential programming language with assignment statements, it is a functional language in which you must express the output you want as a function of the input. Don't think about accumulating the total as you go along, think about calculating it at the point it is needed, using XPath expressions such as "sum(../item/price)". Mike Kay 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
|