Creating the IS schema would need to be done by hand, if you need it. Another approach would be to create an XML schema using XMLSpy or other tool. Then use that to create an IS doc type and schema.
I’m tempted to ask why use description names instead of the segment names but I assume there’s some reason. BTW, BEG would be “BeginningSegment” not “BeginningOfSegment”.
As for counting segments that’s going to be a challenge. One approach that may work is to use the IS Java API to count the number of elements in your top level document. Other people may have other suggestions.
#Integration-Server-and-ESB#edi#webMethods