|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: simple summation question
> From: Lee, Insoo [mailto:Insoo.Lee@xxxxxx] > Sent: Monday, December 30, 2002 2:12 PM > Subject: simple summation question > > Hello - a quick simple question, how would get a subTotal > for someValue by > entity as shown below? > I can get a grand total by using sum(/report/entity/row/someValue).. > > Thanks > The simplest way would be "sum(/report/entity[n]/row/someValue)", where n is the position of the selected entity element in document order. If you wanted to output each subtotal you could do <xsl:for-each select="/report/entity"> <xsl:value-of select="sum(row/someValue)"/> </xsl:for-each> xsl:apply-templates could also be used in a similar fashion. hth, b. | brian martinez brian.martinez@xxxxxxxx | | senior gui programmer 303.708.7248 | | trip network, inc. fax 303.790.9350 | | 6436 s. racine cir. englewood, co 80111 | | http://www.cheaptickets.com/ http://www.trip.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
|

Cart








