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

[xsl] Grouping of Tags


Subject: [xsl] Grouping of Tags
From: Marc Baumgartner <moewe@xxxxxx>
Date: Fri, 20 Jun 2003 13:53:25 +0200

Hello Everybody,

I have got a little problem with my Stylesheet.
In my XML I have two types of tags. My result should be a table where I want 
for every block of the first tag a new row which contains all the following 
second tags.

A possible xml doc:

<root>
	<first no="1"/>
	<second no="2"/>
	<second no="3"/>
	<first no="4"/>
	<first no="5"/>
	<second no="6"/>
	<second no="7"/>
	<first no="8"/>
	<second no="9"/>
</root>


I want the following:

<table>
	<tr>
		<td><first no="1"/></td>
		<td><second no="2"/><second no="3"/></td>
	</tr>
	<tr>
		<td><first no="4"/><first no="5"/></td>
		<td><second no="6"/><second no="7"/></td>
	</tr>
	<tr>
		<td><first no="8"/></td>
		<td><second no="9"/></td>
	</tr>
</table>

Is this possbile with xsl? I haved tried this for several hours but I could 
not find a solution.

Thanks in advance,

Marc


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



Current Thread
Keywords
xml