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

Adding empty elements for alignment

Subject: Adding empty elements for alignment
From: "Kevin Bird" <kevin.bird@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 23 Sep 2004 12:38:01 +0100
bird 43
Hi

I have the following XML structure.

SOURCE:
<table>
	<row1>
		<column seq="1">Value</column>
		<column seq="2">Value</column>
		<column seq="3">Value</column>
		<column seq="4">Value</column>
		<column seq="5">Value</column>
		<column seq="6">Value</column>
	</row1>
	<row2>
		<column seq="1">Value</column>
		<column seq="3">Value</column>
		<column seq="5">Value</column>
	</row2>
</table>

REQUIRED OUTPUT:
<table>
	<row1>
		<column seq="1">Value</column>
		<column seq="2">Value</column>
		<column seq="3">Value</column>
		<column seq="4">Value</column>
		<column seq="5">Value</column>
		<column seq="6">Value</column>
	</row1>
	<row2>
		<column seq="1">Value</column>
		<column seq="2"/>
		<column seq="3">Value</column>
		<column seq="4"/>
		<column seq="5">Value</column>
		<column seq="6"/>
	</row2>
</table>

PROBLEM:
<row1> can contain 1 or many <column> elements.
<row2> can contain zero or many <column> elements. I want to output
empty <column> elements so <row2> columns align with <row1>.

Any help will be greatly appreciated.

--
Kevin Bird

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.