|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] How to Sort, Group, sub-Total and Total in XSL
Hello,
I'm fairly new to XSL and I would like to produce results similar to
the following:
Product Based XSL:
Product Id: AAA
Invoice #: 1234 Qty Ordered: 500
Invoice #: 5678 Qty Ordered: 200
Total for Product AAA: 700
Product Id: BBB
Invoice #: 1234 Qty Ordered: 400
Total for Product BBB: 400
Total Ordered: 1100
Invoice Based XSL:
Invoice #: 1234
Product Id: AAA Qty Ordered: 500
Product Id: BBB Qty Ordered: 400
Total for Invoice # 1234: 900
Invoice #: 5678
Product Id: AAA Qty Ordered: 200
Total for Invoice # 5678: 200
Total Ordered: 1100
Both XSL documents would be based on the same XML document, similar to the
following:
<order_history>
<order_information>
<invoice>1234</invoice>
<product>AAA</product>
<qty_ordered>500</qty_ordered>
</order_information>
<order_information)
<invoice>5678</invoice>
<product>AAA</product>
<qty_ordered>200</qty_ordered>
</order_information>
<order_information>
<invoice>1234</invoice>
<product>BBB</product>
(qty_ordered>400</qty_ordered>
</order_information>
</order_history>
So far, I've been able to sort the XML data in the proper order by using
<xsl:for-each select="order_information" order-by="product_id"> and the
appropriate xsl:value-of select statements. I've found examples of how to
total two fields, but I'm not sure how to perform the required level-break
logic for the subtotals within XSL.
Can something like this be done with XSL? I'm using Vendor: Microsoft
Processor version: Original IE5 (or old version of other processor)
Thanks in advance for any help.
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








