A complicated PO Schema–help

Home Page Forums BizTalk 2004 – BizTalk 2010 A complicated PO Schema–help

Viewing 1 reply thread
  • Author
    Posts
    • #13644

      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?

    • #13645

      Figured it out. Should use LOOP in map. Totally forget the power of map. 😳

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.