[xsl] conditional multiline output

Subject: [xsl] conditional multiline output
From: "Erwin Kloeck" <kloeck@xxxxxxxxx>
Date: Wed, 31 Jan 2007 10:30:05 +0100
Hi,

I'd like to get some pointers with the following problem. I use saxon
8.8 and xsl 2.0

I have a list of date elements in my xml that I want to output in
columns in a csv file.
If the same date occurs more than once, I want another line in the
respective column
and the label in the first column.

I think I should group the dates and then cicle thru and output the
line with all 1st elements in the group, then all 2nd elements in the
second line etc.

I would appreciate some pointers at how to do this.

Thanks

Erwin

Here are my examples:

--- begin example.xml ---
<?xml version="1.0" encoding="UTF-8"?>
<top>
   <logpoint value="AAA" >
       <date value="2007-01-01" count="1" string="aaa"/>
       <date value="2007-01-01" count="11" string="xxx"/>
       <date value="2007-01-02" count="2" string="bbb"/>
       <date value="2007-01-03" count="3" string="ccc"/>
       <date value="2007-01-03" count="4" string="ddd"/>
       <date value="2007-01-03" count="41" string="yyy"/>
       <date value="2007-01-04" count="5" string="eee"/>
   </logpoint>
   <logpoint value="BBB" >
       <date value="2007-01-01" count="31" string="lll"/>
       <date value="2007-01-02" count="32" string="mmm"/>
       <date value="2007-01-03" count="33" string="nnn"/>
       <date value="2007-01-04" count="34" string="ooo"/>
   </logpoint>
</top>
--- begin example.xml ---

desired output:
--- begin example.csv ---
logpoint;2007-01-01;2007-01-02;2007-01-03;2007-01-04;
AAA;aaa[1];bbb[2];ccc[3];eee[5];
AAA;xxx[11];;ddd[4];;
AAA;;;yyy[41];;
BBB;lll[31];mmm[32];nnn[33];ooo[34];
--- end example.csv ---

Current Thread