XML Output Stage - Repetative groups

Dedicated to DataStage and DataStage TX editions featuring IBM<sup>®</sup> Service-Oriented Architectures.

Moderators: chulett, rschirm

Post Reply
joffijoy
Participant
Posts: 22
Joined: Mon Jun 11, 2007 8:51 am

XML Output Stage - Repetative groups

Post by joffijoy »

Hi,

I Have a requitement to create a XML with Multiple repitatve goups. How should I give my Input and XML Output stage parameters? What would be appopriate key to set? Do I Need to restucture my Input?

I have used Single repetitative group in XML before, I have also read the XML design document and tried different permutations of xpath as keys and nothing seems to be working.

Thank you,
Joffi.

example of my expected O/P XML will be as follows:

As you see, A. OrderLines B. HeaderCharges C. References are my repetative groups.

My Input: is a denormaized structure as

Order Header | Line Attributes | HeaderCharges attributes| Reference attributes



Expected Output:

<?xml version='1.0' ?>
<Order CustomerPONo="new order 3" OrderNo="1-33775161" EnterpriseCode="ENT-689950" >
<OrderLines>
<OrderLine PrimeLineNo="1" >
<Item ItemDesc="NABI ASSEMBLY" ItemID=" 515-1503-013" UnitOfMeasure="PC" ManufacturerName="687563" ManufacturerItem=""/>
<LinePriceInfo UnitPrice="33"/>
<LineTaxes>
<LineTax Tax="" TaxName="TAX"/>
</LineTaxes>
<OrderDates>
<OrderDate DateTypeId="PROMISE" RequestedDate="2007-10-25T00:00:00-00:00"/>
</OrderDates>
<References>
<Reference Name="SiebelLineID" Value="1-K4CY6"/>
</References>
</OrderLine>
<OrderLine PrimeLineNo="2" >
<Item ItemDesc="LAMB ASSEMBLY" ItemID=" 515-1503-018" UnitOfMeasure="PC" ManufacturerName="687563" ManufacturerItem=""/>
<LinePriceInfo UnitPrice="33"/>
<LineTaxes>
<LineTax Tax="" TaxName="TAX"/>
</LineTaxes>
<OrderDates>
<OrderDate DateTypeId="PROMISE" RequestedDate="2007-10-25T00:00:00-00:00"/>
</OrderDates>
<References>
<Reference Name="SiebelLineID" Value="1-K4CY6"/>
</References>
</OrderLine>
</OrderLines>
<PersonInfoShipTo AddressLine1="2802 Stoney Wood Dr" AddressLine2="Blk 3" AddressLine3="8" />
<PersonInfoBillTo AddressLine1="7777 Windwater Parkway S" AddressLine2="Blk 10" AddressLine3="3"/>
<PriceInfo Currency="USD"/>
<HeaderCharges>
<HeaderCharge ChargeAmount="1" ChargeCategory="Discount" Reference=""/>
<HeaderCharge ChargeAmount="2" ChargeCategory="Shipping"/>
<HeaderCharge ChargeAmount="" ChargeCategory="Tariff"/>
</HeaderCharges>
<HeaderTaxes>
<HeaderTax Tax="" TaxName="TAX"/>
</HeaderTaxes>
<Notes>
<Note NoteText="change order"/>
</Notes>
<References>
<Reference Name="SiebelHeaderId" Value="1-K4CY5"/>
<Reference Name="RevisionNo" Value="3"/>
</References>
</Order>
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Have you successfully built your Orderlines, or References or Header groups in their own XML Stage instances, and then saved them to a file for later lookup? What problems have you had combining them? The techniques in the best practices define how to build the xml "in pieces"....you can't build it all in one XMLOutput Stage.... you will need a minumum of 3 instances of XMLOutput to get this one done, maybe even 4..... where have the problems been? What kind of output are you getting?

Ernie
joffijoy
Participant
Posts: 22
Joined: Mon Jun 11, 2007 8:51 am

Re: XML Output Stage - Repetative groups

Post by joffijoy »

I have finally implimented using XSL( Using XSL to do transform) and XSLT stage.
Post Reply