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

XSL to generate required output

Subject: XSL to generate required output
From: "Amrit Pal Singh" <ampsingh@xxxxxxxxx>
Date: Mon, 12 Dec 2005 10:15:18 +0530
row cell in xsl
Hi friends,

I'm Having following input xml file.

<?xml version="1.0" encoding="UTF-8"?>
<WoorkBook>
	<WorkSheet>
		<Name>Tarifs Clts &amp; prog. de commande</Name>
		<table>
			<Row>
				<Cell>##</Cell>
			</Row>
			<Row>
				<Cell>COUPE</Cell>
				<Cell>Puissance</Cell>
				<Cell>Transmission</Cell>
				<Cell>Puissance fiscale</Cell>
				<Cell>Prix clientTTC EUR </Cell>
				<Cell>Code modhle</Cell>
			</Row>
			<Row/>
			<Row>
				<Cell>Audi TT</Cell>
				<Cell>163 ch</Cell>
				<Cell>BV 5 </Cell>
				<Cell>10 CV*</Cell>
				<Cell>28900</Cell>
				<Cell>8N30L40C00</Cell>
			</Row>
			<Row>
				<Cell>Audi TT</Cell>
				<Cell>190 ch</Cell>
				<Cell>BV 5 </Cell>
				<Cell>12 CV*</Cell>
				<Cell>30800</Cell>
				<Cell>8N30M40C00</Cell>
			</Row>
			<Row>
				<Cell>##</Cell>
			</Row>
			<Row/>
			<Row>
				<Cell>Audi TT</Cell>
				<Cell>163 ch</Cell>
				<Cell>BV 5 </Cell>
				<Cell>10 CV*</Cell>
				<Cell>31000</Cell>
				<Cell>8N90L40C00</Cell>
			</Row>
			<Row>
				<Cell>Audi TT</Cell>
				<Cell>190 ch</Cell>
				<Cell>BV 5 </Cell>
				<Cell>12 CV*</Cell>
				<Cell>33300</Cell>
				<Cell>8N90M40C00</Cell>
			</Row>
		</table>
	</WorkSheet>
</WoorkBook>


I need to generate the ouput as below. i.e to take hierarchy one level down
when I see ## in Cell.

<?xml version="1.0" encoding="UTF-8"?>
<WoorkBook>
	<WorkSheet>
		<Name>Tarifs Clts &amp; prog. de commande</Name>
		<table>
			<New>
				<Row>
					<Cell>COUPE</Cell>
					<Cell>Puissance</Cell>
					<Cell>Transmission</Cell>
					<Cell>Puissance fiscale</Cell>
					<Cell>Prix clientTTC EUR </Cell>
					<Cell>Code modhle</Cell>
				</Row>
				<Row/>
				<Row>
					<Cell>Audi TT</Cell>
					<Cell>163 ch</Cell>
					<Cell>BV 5 </Cell>
					<Cell>10 CV*</Cell>
					<Cell>28900</Cell>
					<Cell>8N30L40C00</Cell>
				</Row>
				<Row>
					<Cell>Audi TT</Cell>
					<Cell>190 ch</Cell>
					<Cell>BV 5 </Cell>
					<Cell>12 CV*</Cell>
					<Cell>30800</Cell>
					<Cell>8N30M40C00</Cell>
				</Row>
			</New>
			<New>
				<Row>
					<Cell>Audi TT</Cell>
					<Cell>163 ch</Cell>
					<Cell>BV 5 </Cell>
					<Cell>10 CV*</Cell>
					<Cell>31000</Cell>
					<Cell>8N90L40C00</Cell>
				</Row>
				<Row>
					<Cell>Audi TT</Cell>
					<Cell>190 ch</Cell>
					<Cell>BV 5 </Cell>
					<Cell>12 CV*</Cell>
					<Cell>33300</Cell>
					<Cell>8N90M40C00</Cell>
				</Row>
			</New>
		</table>
	</WorkSheet>
</WoorkBook>

Please let me know how to achaive this.

Thanks,
Amrit

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.