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

Grouping Using XSL

Subject: Grouping Using XSL
From: Rigoberto <rbejaran@xxxxxxxxxxxx>
Date: Mon, 20 Jan 2003 20:20:27 -0500
grouping using xslt
hi everybody!!!

I got some problems grouping some data from a xml doc. Actually the xml 
doc looks like this:

<data>
      <col id="1">1</col>
      <col id="2">1</col>
      <col id="3">hello</col>
</data>
<data>
      <col id="1">1</col>
      <col id="2">1</col>
      <col id="3">bye</col>
</data>
<data>
      <col id="1">1</col>
      <col id="2">1</col>
      <col id="3">oops</col>
</data>
<data>
      <col id="1">1</col>
      <col id="2">2</col>
      <col id="3">hello</col>
</data>

what i´m trying to do, is create an xml document grouping the document 
source using the col elements dinamically ( col[1], col[1] and col[2], 
col[2],etc). so, if i use col[1] and col[2] the results should looks 
like this:

<data>
      <col id="1">1</col>
      <col id="2">1</col>
      <col id="3">
                  <val>hello</val>
                  <val>bye</val>
                  <val>oops</val>
      </col>
</data>
<data>
      <col id="1">1</col>
      <col id="2">2</col>
      <col id="3">
                  <val>hello</val>
      </col>
</data>

i´m using xalan(xalan-j_2_4_1) processor so I THINK (maybe i´m wrong) 
that i can´t use the <xsl:for-each-group/> tag. can i use any other 
processor? what can i do? any ideas?
i´m using jdk1.3.1.

thanks.

_______________________________________________________________________
Te recomendamos:
Aventuras para los más pequeños en: http://www.terra.com.co/ninos/
Vive la pasión del fútbol en: http://www.terra.com.co/deportes/futbol/



 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.