Creating your own EDI Schema for BizTalk - Part I

First off, you'll notice that the title of this blog includes Part 1.  I don't have any other parts...yet.  But from what I've seen so far in terms of paucity of documentation and general gotchas, I fully expect there to be.

So I'm create an EDI schema for a 204 transaction.  Not a very large transaction, so it figures to be relatively easy to put together.  As it turns out, there are a couple of loops within the transaction.  Since the 204 transaction is a load tender, there is a header/detail relationship between some of the segments.  So after create the header segments, I define an element called DetailLoop.  Then, further down in the schema, I define DetailLoop as containing, among other segments, an S5 segment.

Once the schema has been built, I build the project that contains it.  A build error is generated. Specifically, the error is:

Segment name [DetailLoop] does not start with value of tag [S5]

The problem is that the EDI schema validator gives more weight to the loop name than I originally thought.  It is expecting that the name of the loop start with the name of the first tag in the loop. In other words, when I changed the name of the loop from DetailLoop to S5Loop, the error went away.