[xsl] Applying XSL for changing XML input.

Subject: [xsl] Applying XSL for changing XML input.
From: samir sawant <cindy_mona@xxxxxxxxx>
Date: Wed, 9 Feb 2005 14:10:56 -0800 (PST)
I have an XML file say as below:

<region>
		<row>
			<field1>017814100</field1>
			<field2>178141</field2>
			<field3>SWITCH</field3>
			<field4>006</field4>
			<field5>000011</field5>
			<field6>109.36</field6>
			<field7>74.28</field7>
		</row>
		<row>
			<field1>307429600</field1>
			<field2>3074296</field2>
			<field3>CLP,RTG</field3>
			<field4>006</field4>
			<field5>000011</field5>
			<field6>168.59</field6>
			<field7>114.51</field7>
		</row>
                 .....
                 .....
 </region>

I want this XML file to be converted into PDF format
in 2 columns as below:

H1 H2 H3 H4 H5 H6 H7         H1 H2 H3 H4 H5 H6 H7
-- -- -- -- -- -- --         -- -- -- -- -- -- --
-- -- -- -- -- -- --         -- -- -- -- -- -- --

Where H1 to H7 are field headings and -- is record
element. The flow of records is down and then across.

Wait..The main question or Problem is ahead....

My XML input can change, It means it will still have 7
fields but few fields marked as 'NIL' like as below.
In below XML , field 4 and 7 are marked as 'NIL'

<region>
		<row>
			<field1>017814100</field1>
			<field2>178141</field2>
			<field3>SWITCH</field3>
			<field4>NIL<field4>
			<field5>000011</field5>
			<field6>109.36</field6>
			<field7>NIL</field7>
		</row>
		<row>
			<field1>307429600</field1>
			<field2>3074296</field2>
			<field3>CLP,RTG</field3>
			<field4>NIL</field4>
			<field5>000011</field5>
			<field6>168.59</field6>
			<field7>NIL</field7>
		</row>
                 .....
                 .....
 </region>


In this case my PDF output should be as below without
field4 and field7:


H1 H2 H3 H5 H6               H1 H2 H3 H5 H6 
-- -- -- -- --               -- -- -- -- -- 
-- -- -- -- --               -- -- -- -- -- 


Any of my field can be NIL and The PDF output should
be properly spaced in 2 columns irrespictive of the
number of columns.

Hope someone can help me in this.
Thanks,

Samir





		
__________________________________ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 

Current Thread