Hi,
Thanks to help of fellow SO users that helped me out in this question I am half way through my XML transformation.
The problem that I hit a wall with transforming comma seperated values (DATE and QTY):
<?xml version="1.0" encoding="utf-8"?>
<results>
<recordset rowCount="68" fieldNames="ITEM,ECL,LEAD_TIME,QTY,DATE" type="**coldfusion.sql.QueryTable**">
<field name="ITEM">
<string>ITEM_A</string>
<string>ITEM_B</string>
<string>ITEM_C</string>
</field>
<field name="REV">
<string>A</string>
<string>B</string>
<string>C</string>
</field>
<field name="LEAD_TIME">
<string>10</string>
<string>15</string>
<string>25</string>
</field>
<field name="QTY">
<string>10,13,3</string>
<string>1,5,2</string>
<string>6,10,25</string>
</field>
</recordset>
<var name="DATE_LABELS">
<string>05-18,05-25,06-01</string>
</var>
</results>
Into:
<records>
<item_line>
<item>ITEM_A</item>
<rev>A</rev>
<lead_time>10</lead_time>
<values>
<qty date="05-18>10</qty>
<qty date="05-25>13</qty>
<qty date="06-01>3</qty>
</values>
</item_line>
<item_line>
<item>ITEM_B</item>
<rev>B</rev>
<lead_time>15</lead_time>
<values>
<qty date="05-18>1</qty>
<qty date="05-25>5</qty>
<qty date="06-01>2</qty>
</values>
</item_line>
<item_line>
<item>ITEM_C</item>
<rev>C</rev>
<lead_time>25</lead_time>
<values>
<qty date="05-18>6</qty>
<qty date="05-25>10</qty>
<qty date="06-01>25</qty>
</values>
</item_line>
</records>
Is it at all possible to express it with XSLT?
I am starting to hate the guy that "designed" the source xml schema...
UPDATE: Thanks for your help!