[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

How to select a numbered group of elements

Subject: How to select a numbered group of elements
From: philip.borg@xxxxxxxxxxxxxxx
Date: Tue, 19 Feb 2002 15:50:16 +0000
philip borg

I have an xml file like (there can be any number of <tx> elements)

<payment>
 <tx><paymentId>123456</paymentId><payType>EURO</payType><amt>10.00</amt></tx>
 <tx><paymentId>123457</paymentId><payType>EURO</payType><amt>20.00</amt></tx>
 <tx><paymentId>123458</paymentId><payType>EURO</payType><amt>30.00</amt></tx>
 <tx><paymentId>123459</paymentId><payType>EURO</payType><amt>40.00</amt></tx>
 <tx><paymentId>123460</paymentId><payType>EURO</payType><amt>50.00</amt></tx>
</payment>

which I need to group in sets of 3 so that I can output a checksum line every
three lines of the <amt> tags. I also need to do this for the last line as well

eg
Header Text
123456    EURO 10.00
123457    EURO 20.00
123458    EURO 30.00
Checksum  60.00
123459    EURO 40.00
123460 EURO    50.00
Checksum  90.00
Footer text

Is this possible with XSLT

*******************Internet Email Confidentiality Footer*******************
A list of the names of the partners in the UK firm of Arthur Andersen is open to
inspection at 180 Strand, London, WC2R 1BL (principal place of business).

Privileged/Confidential Information may be contained in this message.  If you
are not the addressee indicated in this message (or responsible for delivery of
the message to such person), you may not copy or deliver this message to anyone.
In such case, you should destroy this message and kindly notify the sender by
reply email. Please advise immediately if you or your employer does not consent
to Internet email for messages of this kind.  Opinions, conclusions and other
information in this message that do not relate to the official business of my
firm shall be understood as neither given nor endorsed by it.



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.