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

populating tables (long) 2nd try

Subject: populating tables (long) 2nd try
From: k.weitzer@xxxxxx
Date: Fri, 9 Nov 2001 22:03:03 +0100
lt td gt
Question of populating a HTML - table:

given this XML - document:

<ROOT>
	<LEVEL_1 l1_attr="cell_content 1">
		<LEVEL_2 l2_attr="cell_content 1 1">
			<LEVEL_3 l3_attr="cell_content 1 1 1"/>
			<UNIQUE_LVL_2>some text 1 1</UNIQUE_LVL_2>
			<LEVEL_3 l3_attr="cell_content 1 1 2"/>
			<LEVEL_3 l3_attr="cell_content 1 1 3"/>
		</LEVEL_2>
	</LEVEL_1>
	<LEVEL_1 l1_attr="cell_content 2">
		<LEVEL_2 l2_attr="cell_content 2 1">
			<LEVEL_3 l3_attr="cell_content 2 1 1"/>
			<UNIQUE_LVL_2>some text 2 1</UNIQUE_LVL_2>
			<LEVEL_3 l3_attr="cell_content 2 1 2"/>
			<LEVEL_3 l3_attr="cell_content 2 1 3"/>
		</LEVEL_2>
		<LEVEL_2 l2_attr="cell_content 2 2 ">
			<LEVEL_3 l3_attr="cell_content 2 2 1"/>
			<UNIQUE_LVL_2>some text 2 2</UNIQUE_LVL_2>
			<LEVEL_3 l3_attr="cell_content 2 2 2"/>
			<LEVEL_3 l3_attr="cell_content 2 2 3"/>
		</LEVEL_2>
		<LEVEL_2 l2_attr="cell_content 2 3">
			<LEVEL_3 l3_attr="cell_content 2 3 1"/>
			<UNIQUE_LVL_2>some text 2 3</UNIQUE_LVL_2>
			<LEVEL_3 l3_attr="cell_content 2 3 2"/>
			<LEVEL_3 l3_attr="cell_content 2 3 3"/>
		</LEVEL_2>
	</LEVEL_1>
	<LEVEL_1 l1_attr="cell_content 3">
		<LEVEL_2 l2_attr="cell_content 3 1">
			<LEVEL_3 l3_attr="cell_content 3 1 1"/>
			<UNIQUE_LVL_2>some text 3 1</UNIQUE_LVL_2>
			<LEVEL_3 l3_attr="cell_content 3 1 2"/>
			<LEVEL_3 l3_attr="cell_content 3 1 3"/>
		</LEVEL_2>
		<LEVEL_2 l2_attr="cell_content 3 2">
			<LEVEL_3 l3_attr="cell_content 3 2 1"/>
			<UNIQUE_LVL_2>some text 3 2</UNIQUE_LVL_2>
		</LEVEL_2>
	</LEVEL_1>
...
</ROOT>

i have to generate a HTML - table like this:
<table border="1">
	<tr>
		<td rowspan="3">cell_content 1</td>
		<td rowspan="3">cell_content 1 1</td>
		<td rowspan="3">some text 1 1</td>
		<td>cell_content 1 1 1</td>
	</tr>
	<tr>
		<td>cell_content 1 1 2</td>
	</tr>
	<tr>
		<td>cell_content 1 1 3</td>
	</tr>
	<tr>
		<td rowspan="9">cell_content 2</td>
		<td rowspan="3">cell_content 2 1</td>
		<td rowspan="3">some text 2 1</td>
		<td>cell_content 2 1 1</td>
	</tr>
	<tr>
		<td>cell_content 2 1 2</td>
	</tr>
	<tr>
		<td>cell_content 2 1 3</td>
	</tr>
	<tr>
		<td rowspan="3">cell_content 2 2</td>
		<td rowspan="3">some text 2 2</td>
		<td>cell_content 2 2 1</td>
	</tr>
	<tr>
		<td>cell_content 2 2 2</td>
	</tr>
	<tr>
		<td>cell_content 2 2 3</td>
	</tr>
	<tr>
		<td rowspan="3">cell_content 2 3</td>
		<td rowspan="3">some text 2 3</td>
		<td>cell_content 2 3 1</td>
	</tr>
	<tr>
		<td>cell_content 2 3 2</td>
	</tr>
	<tr>
		<td>cell_content 2 3 3</td>
	</tr>
	<tr>
		<td rowspan="4">cell_content 3</td>
		<td rowspan="3">cell_content 3 1</td>
		<td rowspan="3">some text 3 1</td>
		<td>cell_content 3 1 1</td>
	</tr>
	<tr>
		<td>cell_content 3 1 2</td>
	</tr>
	<tr>
		<td>cell_content 3 1 3</td>
	</tr>
	<tr>
		<td>cell_content 3 2</td>
		<td>some text 3 2</td>
		<td>cell_content 3 2 1</td>
	</tr>
</table>

following conditions exists:
the number of levels is not known
each level consists at least of one empty element
ordering isn't necessary
rendering is done by msxml 3.0
each text and/or attribute node has to be a td

I have no clue how to do it, 'cause all my tries were
fruitless.
hope you can help
Klaus
____________________________________________________
Berufsunfähigskeitversicherung von Mamax bei WEB.DE. 
Jetzt informieren! http://bu.web.de


 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.