In Bitzalk 2010 I should map from an input to an XML with the following structure:
<REQUEST>
<PROGRAM name="PROGRAM123">
<INPUT>
<INSTRUCT name="INSTR1">
<FIELD name="FIELD11">VALUE1</FIELD>
<FIELD name="FIELD12">VALUE2</FIELD>
<FIELD name="FIELD13">VALUE3</FIELD>
</INSTRUCT>
<INSTRUCT name="INSTR2">
<FIELD name="FIELD21">VALUE4</FIELD>
<FIELD name="FIELD22">VALUE5</FIELD>
<FIELD name="FIELD23">VALUE6</FIELD>
<FIELD name="FIELD24">VALUE7</FIELD>
</INSTRUCT>
<INSTRUCT name="INSTR2">
<FIELD name="FIELD21">VALUE8</FIELD>
<FIELD name="FIELD22">VALUE9</FIELD>
<FIELD name="FIELD23">VALUE10</FIELD>
<FIELD name="FIELD24">VALUE11</FIELD>
</INSTRUCT>
</INPUT>
</PROGRAM>
</REQUEST>
The generated XSD was like this:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="REQUEST" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="REQUEST" msdata:IsDataSet="true" msdata:Locale="en-US">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="PROGRAM">
<xs:complexType>
<xs:sequence>
<xs:element name="INPUT" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="INSTRUCT" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="FIELD" nillable="true" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent msdata:ColumnName="FIELD_Text" msdata:Ordinal="1">
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
The generated structure was just "general" and I would have to use the table looping functoid to map it in Biztalk. I have got the information from this solution: http://hestia.typepad.com/flatlander/2007/01/mapping_fixed_e.html But this seems very cumbersome for me (I have got 40 fields with some constant values).
Another possibility would be to use XSLT. But I don't have got any experience with it and I would prefer to map it directly in Biztalk (without XSLT)
Is there the possibility of creating an XSD scheme, so I would have all the fields in the map editor and create the mapping in there (without using the table looping functoid).
Any ideas / comments would be appreciated (even if the answer is: "use XSLT")