The PO’s structure is:
Header|POID|blabla|blabla
Line|blabla|blabla
Shipment|blabla|blabla
Shipment|bla|bla
Line|bla|bla
Shipment|bla|bla
Header|POID|blabla|blabla
Line|blabla|blabla
Shipment|blabla|blabla
One file contains multiple POs, every PO contains multiple Order Lines, and every line has at least one shipment.
My Schema is like this and validated against real file:
[code:1:d97085c816]
[Schema]
[Pos] (line feeder postfix delimited)
[PO] (lind feeder infix)
[Header] (pipe infix delimited)
[Lines] (line feeder infix)
[Line] (pipe infix)
[Shipments] (line feeder infix)
[shipment] (pipe infix)
[/code:1:d97085c816]
I need to transform this flatfile into XML format, the mapping is one to one. After pushing through the pipe, the resulted XML file is like this:
<Pos>
<PO>
<Header> aaaa </Header>
<Header> bbbb </Header>
<Header> cccc </Header>
<Lines>
<Line>aaa</Line>
<Line>bbb</Line>
<Line>ccc</Line>
</Lines>
<Shipments>
<shipment>aaa1</shipment>
<shipment>aaa2</shipment>
<shipment>bbb</shipment>
<shipment>ccc</shipment>
</Shipments>
</PO>
</Pos>
It groups same element, not according to the sequence I defined in the schema. And I used Sequence for the content model.
How should I change the schema?