Skip to Content
0
Oct 12, 2017 at 04:38 PM

For Each Group equivalent function in XSLT 1.0

1318 Views

Hi Folks,

I have issue getting XSLT 2.0 working with PO 7.5.

I'm using For each group to group the orders by po_no.

I would request your help with similar code that is compatible with XSLT 1.0

I receive data as below:

Source Structure:

<data>

<po_no>100</po_no>

<po_item>01</po_item>

<date>20171004</date>

<supplier>12</supplier>

</data> <data>

<po_no>100</po_no>

<po_item>02</po_item>

<date>20171004</date>

<supplier>13</supplier>

</data>

I need to transform it as below:

<data>

<Header>

<date>20171004</date>

<po_no>100</po_no>

</Header>

<Item>

<po_item>01</po_item>

<supplier>12</supplier>

</Item>

<Item>

<po_item>02</po_item>

<supplier>12</supplier>

</Item>

</data>

I used XSLT 2.0 foreachgroup & code works fine but I cannot get it working on PO.

I have also applied note 2221350- but no go. Could you please help me with xslt 1.0 equivalent grouping code.