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

XSL:Sort-By

Subject: XSL:Sort-By
From: Gavin Myers <GavinM@xxxxxxxxx>
Date: Tue, 24 Apr 2001 11:49:07 -0500
xsl sort by
Hello, right now we have a bunch of reports that all look the same, but use
different xml files.

example:

<SpendingHabits>
<User ID="1" Name="John Doe" Department="Sales" Spent = "20">
<User ID="2" Name="Larry Doe" Department="Sales" Spent = "540">
<User ID="3" Name="George Franklin" Department="Marketing" Spent = "10">
</SpendingHabits>

I'd like to take all these reports and change them to something like this:

<Report Name="Spending Habits">
<ReportData Location="Header">
<Field Name="Name"/>
<Field Name="Department"/>
<Field Name="Spent"/>
</ReportData>
<ReportData Location="Body">
<Entry ID="1">
<Field Name="Name">John Doe</Field>
<Field Name="Department">Sales</Field>
<Field Name="Spent">20</Field>
</Entry>
<Entry ID="2">
<Field Name="Name">Larry Doe</Field>
<Field Name="Department">Sales</Field>
<Field Name="Spent">540</Field>
</Entry>
<Entry ID="3">
<Field Name="Name">George Franklin</Field>
<Field Name="Department">Marketing</Field>
<Field Name="Spent">10</Field>
</Entry>
</ReportData>
</Report>

With this xml the I can use the same xsl file for all of the hundreds of
reports (since they all look the same)

They return like this:

Header1	Header2	Header3	Header4
Value1.A	Value2.A	Value3.A	Value4.A
Value1.B	Value2.B	Value3.B	Value4.B
Value1.C	Value2.C	Value3.C	Value4.C

But, with this current xml structure can I sort by Name, Department and
Spent, since they are no-longer unique?

Does this make sense?

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


Current Thread
  • XSL:Sort-By
    • Gavin Myers - Tue, 24 Apr 2001 12:49:23 -0400 (EDT) <=

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.