Integrating Integrators – BizTalk, Windows Azure, Windows Workflow, and Beyond

A complicated PO Schema--help

BizTalk 2004

This group is for all content related to BizTalk Server 2004. This includes a forum, samples, videos, labs, whitepapers, and tools. Most of the content here also applies to other versions of BizTalk beyond 2004.

A complicated PO Schema--help

  • rated by 0 users
  • This post has 1 Reply |
  • 0 Followers
  • 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?
    Edit
  • Figured it out. Should use LOOP in map. Totally forget the power of map. :oops:
    Edit
Page 1 of 1 (2 items)