Blimey, this is as complex as I remember.
The problem with flat files like these with different numbers of columns per row type is that the XSD you define will have a number of different types with a <choice> element surrounding them.
What I found is that this means that there can only be one of each. So, my XSD I had to manually change to look something like the following:
<xsd:element name="rows">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="row">
<xsd:complexType>
<xsd:choice minOccurs="1" maxOccurs="unbounded" nxsd:choiceCondition="terminated" nxsd:terminatedBy=",">
<xsd:element name="TYPE10" nxsd:conditionValue="10">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="FIELD02" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="""></xsd:element>
<xsd:element name="FIELD03" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="""></xsd:element>
<xsd:element name="FIELD04" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="""></xsd:element>
<xsd:element name="FIELD05" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="""></xsd:element>
<xsd:element name="FIELD06" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="""></xsd:element>
<xsd:element name="FIELD07" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="""></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="TYPE11" nxsd:conditionValue="11">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="FIELD02" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="""></xsd:element>
<xsd:element name="FIELD03" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="""></xsd:element>
In My flat files, the first column is a number (10,11) etc, and the fields are terminated by a comma. As you can see you have to specify which field is the last column and therefore is terminated by a line feed.
If you google "edifact convert xml schema" there are a number of pages that refer to managing this process of flat file to XML conversion for the different document types. Doing it manually can be done, but it's going to be a bit of work....
Good luck!
Chris