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

sort and grouping on 2 different attributes

Subject: sort and grouping on 2 different attributes
From: "Joeri Belis" <joeri.belis@xxxxxxxxxxxx>
Date: Tue, 21 Jan 2003 13:41:45 +0100
list of different attributes
I have the following simplified xml

<root>
  <rec A="0" B="1">1</rec>
  <rec A="0" B="3">2</rec>
  <rec A="0" B="3">3</rec>
  <rec A="0" B="3">4</rec>
  <rec A="1" B="1">5</rec>
  <rec A="1" B="1">6</rec>
  <rec A="2" B="1">7</rec>
  <rec A="3" B="1">8</rec>
</root>

each node has 2 attributes ( A and B ). When A="0" then B should be used for
grouping
When A != "0" then A should be used for grouping. Sorting should be done on
A and B
( my simplified example xml is already sorted on A and B)

the result should be than when a group changed i display subtitle

title-1
  <rec A="0" B="1">1</rec>
title-2
  <rec A="0" B="3">2</rec>
  <rec A="0" B="3">3</rec>
  <rec A="0" B="3">4</rec>
title-3
  <rec A="1" B="1">5</rec>
  <rec A="1" B="1">6</rec>
title-4
  <rec A="2" B="1">7</rec>
title-5
  <rec A="3" B="1">8</rec>

I find i hard to find a simple but waterproof solution for grouping on the 2
different attributes.

Joeri



 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.