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

Group and sort nodes by attribut in child node

Subject: Group and sort nodes by attribut in child node
From: "Jens Burkhardt" <JensBurkhardt@xxxxxx>
Date: Fri, 14 Oct 2011 15:52:35 +0200 (CEST)
 Group and sort nodes by attribut in child node
Hi everyone,

I need to group nodes by attributes which are in a child node. To be more
specific, this is my XML:

<record>
B B  <column field="keyword" value="A">
B B  <column field="Start_Date" value="23.12.2010">
B B  <column field="Group" value="">
</record>
<record>
B B  <column field="keyword" value="B">
B B  <column field="Start_Date" value="24.12.2010">
B B  <column field="Group" value="X_Group">
</record>
B B  <column field="keyword" value="D">
B B  <column field="Start_Date" value="25.12.2010">
B B  <column field="Group" value="">
</record>
<record>
B B  <column field="keyword" value="C">
B B  <column field="Start_Date" value="23.12.2010">
B B  <column field="Group" value="X_Group">
</record>
</record>
B B  <column field="keyword" value="D">
B B  <column field="Start_Date" value="25.12.2010">
B B  <column field="Group" value="Y_Group">
</record>
<record>
B B  <column field="keyword" value="E">
B B  <column field="Start_Date" value="26.12.2010">
B B  <column field="Group" value="Y_Group">
</record>
<record>

The result should be like this:
B  A - 23.10.2010
B  X_Group
B B B  C - 23.10.2010
B B B  B - 24.12.2010
B  D - 25.10.2010
B  Y_Group
B B B  D - 25.12.2010
B B B  E - 26.12.2010

I want to group by the value of the group field in the column node and
everything should be sorted by start_date. The name of the group (e.g.
X_Group) should start a group-block, followed by the record nodes which belong
to the group value.
Another problem is that i donB4t know the group value in advance, because they
can be set to whatever the user want.

If there is a solution which i didnB4t found, could you please point me in the
right direction?

Thanks in advance.

Best,
Jens
___________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192

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.