[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Send Us Your Interesting XSLT Grouping Use Cases
As indicated in the "Features under Consideration for Future Versions of XSLT" section (Appendix G) of the XSLT 1.0 specification, the XSL Working Group plans make grouping easier in a future release of XSLT. One of the ways that the working group is attacking this problem is to create a set of grouping use cases so any proposed solutions can be compared based on how they handle these common use cases. We want to make sure we don't leave out any important examples of grouping that you the user community is currently working with, so we'd like to invite you to submit use cases that come from your day to day experience in a format based on the email template below. An example use case is included to serve as a guide. Please keep the example source document fragment as small as possible to illustrate the use case. Please email your example grouping use cases to me (Steve.Muench@xxxxxxxxxx) and I'll make sure they get fed into the working group's requirements consideration. Thanks. -----8<----(cut)-------8<-------(cut)-------8<-------(cut)-------8<----- XSLT GROUPING USE CASE TEMPLATE =============================== Use Case Description -------------------- <A short prose description of what the use case is illustrating> Source Fragment --------------- <A small XML fragment of the source document that serves as input> Desired Result Fragment ----------------------- <The desired output of the transformation> -----8<----(cut)-------8<-------(cut)-------8<-------(cut)-------8<----- For example: XSLT GROUPING USE CASE TEMPLATE =============================== Use Case Description -------------------- Group by common values. Produce a 3-column table listing each distinct country (sorted alphabetically) in the first column, an alphabetical list of the city names for each country in the 2nd column, and the sum of the population for the cities in each country in the third column: Source Fragment --------------- <cities> <city name="milan" country="italy" pop="5"/> <city name="paris" country="france" pop="7"/> <city name="munich" country="germany" pop="4"/> <city name="lyon" country="france" pop="2"/> <city name="venice" country="italy" pop="1"/> </cities> Desired Result Fragment ----------------------- <table> <tr><th>Country</th><th>City List</th><th>Population</th></tr> <tr><td>france</td><td>lyon, paris</td><td>9</td></tr> <tr><td>germany</td><td>munich</td><td>4</td></tr> <tr><td>italy</td><td>milan, venice</td><td>6</td></tr> </table> ______________________________________________________________ Steve Muench, Lead XML Evangelist & Consulting Product Manager BC4J & XSQL Servlet Development Teams, Oracle Rep to XSL WG Author "Building Oracle XML Applications", O'Reilly http://www.oreilly.com/catalog/orxmlapp/ 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
|