xsl-list
[Top] [All Lists]

Applying XSL for changing XML input.

2005-02-09 15:10:56
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 

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>