Stephen Ravi 0 Newbie Poster

Hi,

Here my requirement is revealing by seeing the input and output documents.

Can you please help me to transform the input document to output as shown in the below by using the xslt.


Input:

<Parts>
<attribute name = "order_number">515033</attribute>
<attribute name = "orderseq">1</attribute>
<attribute name = "orderstatus">1</attribute>
<attribute name = "linenumber">1</attribute>
<attribute name = "pudo_id">AMS</attribute>
<attribute name = "partcode">DELL 1234</attribute>
<attribute name = "gty_suggested">3</attribute>
<attribute name = "order_number">515034</attribute>
<attribute name = "orderseq">1</attribute>
<attribute name = "orderstatus">1</attribute>
<attribute name = "linenumber">2</attribute>
<attribute name = "pudo_id">ADS</attribute>
<attribute name = "partcode">3C1234</attribute>
<attribute name = "partserialnumber">48765843584</attribute>
<attribute name = "gty_suggested">6</attribute>
<Parts>

Output:

<partsorder>
<order_num>515032</order_num>
<orderseq>1</orderseq>
<orderstatus>1</orderstatus>
<linenumber>1</linenumber>
<pudo_id>AMS</pudo_id>
<partcode>DELL 1234</partcode>
<partserialnumber></partserialnumber>
<gty_suggested>3</gty_suggested>
</partsorder>
<partsorder>
<order_num>515034</order_num>
<orderseq>1</orderseq>
<orderstatus>1</orderstatus>
<linenumber>2</linenumber>
<pudo_id>AMS</pudo_id>
<partcode>3C1234</partcode>
<partserialnumber>48765843584</partserialnumber>
<gty_suggested>3</gty_suggested>
</partsorder>

Thanks,
Ravi