[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Xsl problem with output of repeated lines


Subject: RE: [xsl] Xsl problem with output of repeated lines
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Thu, 6 Feb 2003 13:18:25 -0000

This is a grouping problem, and you should read about grouping (or
"Muenchian grouping") in your favourite XSLT textbook or at
http://www.jenitennison.com/xslt/grouping

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Susanne Kiese
> Sent: 06 February 2003 08:48
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] Xsl problem with output of repeated lines
> 
> 
> Hi list,
> 
> I try to explain my problem - hope I can.
> 
> I have some problems with formatted output of repeated lines. 
> Here is my short xml example:
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <Report>
>   <Zellgruppe>
>     <Zelle>
>       <Zelle>BXB0000C</Zelle>
>       <Alternative>test</Alternative>
>       <HSN>2</HSN>
>       <typ>b</typ>
>       <nr>1</nr>
>       <fix_knz>wunsch</fix_knz>
>     </Zelle>
>     <Zelle>
>       <Zelle>BXB0000C</Zelle>
>       <Alternative>test</Alternative>
>       <HSN>2</HSN>
>       <typ>t</typ>
>       <nr>33</nr>
>       <fix_knz>fest</fix_knz>
>     </Zelle>
>     <Zelle>
>       <Zelle>BXB0000C</Zelle>
>       <Alternative>test</Alternative>
>       <HSN>2</HSN>
>       <typ>td</typ>
>       <nr>22</nr>
>       <fix_knz>frei</fix_knz>
>     </Zelle>
>     <Zelle>
>       <Zelle>BXB0001A</Zelle>
>       <Alternative>xy</Alternative>
>        <HSN>3</HSN>
>         .......
>       </Zelle>
>   </Zellgruppe>
> </Report>
> 
> 
> In this xml file the value of HSN appears once per 
> Zelle,Alternative but 
> the values of typ, nr and fix_knz appears more than once. Now 
> I want to 
> print out one line with value of HSN and several lines with values of 
> typ etc.
> 
> My output example:
> 
> Zelle                 Alternative      values
> ----------- ---------------- --------------
> BXB0000C      test             2                    (one line 
> for value 
> of HSN)
> BXB0000C      test             b   1   wunsch       (three lines for 
> values typ, nr, fix_knz)
> BXB0000C      test             t   33  fest
> BXB0000C      test             td  22  frei
> BXB0001A      xy              3                    (next HSN value)
> ....                                                          
>     (next 
> lines for values typ, nr, fix_knz)
> ....
> 
> Can somebody help me to solve the problem? I tried with parameters to 
> remember the values of Zelle and Alternative but it does not 
> work :-( Many thanks for your help,
> 
> Susanne Kiese
> -- 
> 
> Susanne Kiese - Entwicklung Funknetzdatenbanken   
>       
> Vodafone D2 GmbH - Abt. TES
> Am Seestern 5, D-40547 Duesseldorf   
>    
> phone: +49 172 2400020 oder +49 211 5333600
> fax:   +49 211 5332124
> 
> email: Susanne.Kiese@xxxxxxxxxxxx
> 
> 
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords