|
next
|
Subject: mapping with XSL Author: tera m. Date: 17 Feb 2005 11:25 AM
|
I have an XML file like the following:
<?xml version="1.0" ?>
<catalog>
<cd>
<payment_id>1</payment_id>
<payment_amount>999</payment_amount>
<tax1_amount>10.90</tax_amount>
</cd>
<cd>
<payment_id>1</payment_id>
<payment_amount>999</payment_amount>
<tax2_amount>8.70</tax_amount>
</cd>
<cd>
<payment_id>2</payment_id>
<payment_amount>750</payment_amount>
<tax1_amount>10.70</tax_amount>
</cd>
<cd>
<payment_id>2</payment_id>
<payment_amount>750</payment_amount>
<tax3_amount>9.90</tax_amount>
</cd>
<cd>
<payment_id>3</payment_id>
<payment_amount>980</payment_amount>
<tax2_amount>11.20</tax_amount>
</cd>
.
.
.
</catalog>
Using XSL, I wanna transform the XML file with special mapping
into a Text File with delimiters, as the following:
(every different Payment should b in a different line.
there r 3 types of taxes for each Payment..)
1,999,10.90,8.70,0
2,270,10.70,0,9.90
3,980,0,11.20,0
The parallel Result XML File could b as the following:
<catalog>
<cd>
<payment_id>1</payment_id>
<payment_amount>999</payment_amount>
<tax1_amount>10.90</tax_amount>
<tax2_amount>8.70</tax_amount>
</cd>
<cd>
<payment_id>2</payment_id>
<payment_amount>750</payment_amount>
<tax1_amount>10.70</tax_amount>
<tax3_amount>9.90</tax_amount>
</cd>
<cd>
<payment_id>3</payment_id>
<payment_amount>980</payment_amount>
<tax2_amount>11.20</tax_amount>
</cd>
.
.
.
</catalog>
Does some1 know how to do it?
Any help about it, even partial help, will b welcome.
Thank u!
|
|
|