Biztalk 2002 flatfile to flatfile Schema help
Hi,
I am having trouble outputting multiple detail records in sequence with their corresponding header record. The schema is simple, root>header>detail. The map creates the correct records in this format header>header>header>detail>detail>detail, but what I want is Header>detatil>Header>detail>Header>detail. How can i adjust the schema to produce desired results? Here is the schema, which is delimited, postfix, [header = 1 min, unbounded max], [detail = 1 min, unbounded max]. Thank you.
<?xml version="1.0"?>
<Schema name="Order" b:BizTalkServerEditorTool_Version="1.5" b:root_reference="Order_TXT" b:def_record_delim="0xd" b:standard="FlatFile" xmlns="urn:schemas-microsoft-com:xml-data" xmlns:b="urn:schemas-microsoft-com:BizTalkServer" xmlns:d="urn:schemas-microsoft-com:datatypes">
<b:SelectionFields/>
<ElementType name="Order_TXT" content="eltOnly" model="closed">
<b:RecordInfo structure="delimited" delimiter_type="hex" delimiter_value="0xd" field_order="postfix" append_newline="yes" skip_CR="no" skip_LF="yes"/>
<element type="Header" maxOccurs="*" minOccurs="1"/>
<element type="Detail" maxOccurs="*" minOccurs="1"/>
</ElementType><ElementType name="Header" content="empty" model="closed">
<b:RecordInfo tag_name="|HED|," structure="delimited" delimiter_type="hex" delimiter_value="0x2c" field_order="infix" escape_type="hex" escape_value="0x7e" append_newline="no" skip_CR="no" skip_LF="yes"/>
<AttributeType name="TransmissionID">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="TotalwTax">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="TotalTaxRate3">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="TotalTaxRate2">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="TotalTaxRate1">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="TotalTax3">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="TotalTax2">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="TotalTax1">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="TotalShippingCharge">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="TotalQty">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="TotalItems">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="TotalAmount">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="ThirdPartyAccount">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="TermsOfPayment">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="TermsOfDelivery">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="TelephoneDel">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="TelephoneBill">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="StoreID">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="StateProvinceDel">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="StateProvinceBill">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="ShipmentLabelFormat">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="ShipComplete">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="ReleseDate">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="ReferenceB">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="RecordType">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="RecordCommand">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="PostalZipDel">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="PostalZipBill">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="PODRequired">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="InternalOrderNumber">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="FaxDel">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="FaxBill">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="ExpectedReceiptDate">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="EmailDel">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="EmailBill">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="CustomerOrder">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="CustomerClientID">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="CurrencyCode">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="CountryDel">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="CountryBill">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="ContactDel">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="ContactBill">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="ConsigneeDel">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="ConsigneeBill">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="Comment3">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="Comment2">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="Comment">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="ClientPOType">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="ClientPO">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="ClientDepartment">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="CityDel">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="CityBill">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="ChangeReason">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="CarrierCode">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="CODValue">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="AppointmentRequired">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="Address3Del">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="Address3Bill">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="Address2Del">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="Address2Bill">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="Address1Del">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="Address1Bill">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<attribute type="RecordType" required="no"/>
<attribute type="RecordCommand" required="no"/>
<attribute type="ChangeReason" required="no"/>
<attribute type="InternalOrderNumber" required="no"/>
<attribute type="ReleseDate" required="no"/>
<attribute type="CustomerOrder" required="no"/>
<attribute type="ClientPO" required="no"/>
<attribute type="ReferenceB" required="no"/>
<attribute type="TermsOfDelivery" required="no"/>
<attribute type="CarrierCode" required="no"/>
<attribute type="TermsOfPayment" required="no"/>
<attribute type="ConsigneeDel" required="no"/>
<attribute type="ContactDel" required="no"/>
<attribute type="Address1Del" required="no"/>
<attribute type="Address2Del" required="no"/>
<attribute type="Address3Del" required="no"/>
<attribute type="CityDel" required="no"/>
<attribute type="StateProvinceDel" required="no"/>
<attribute type="PostalZipDel" required="no"/>
<attribute type="CountryDel" required="no"/>
<attribute type="TelephoneDel" required="no"/>
<attribute type="FaxDel" required="no"/>
<attribute type="EmailDel" required="no"/>
<attribute type="ConsigneeBill" required="no"/>
<attribute type="ContactBill" required="no"/>
<attribute type="Address1Bill" required="no"/>
<attribute type="Address2Bill" required="no"/>
<attribute type="Address3Bill" required="no"/>
<attribute type="CityBill" required="no"/>
<attribute type="StateProvinceBill" required="no"/>
<attribute type="PostalZipBill" required="no"/>
<attribute type="CountryBill" required="no"/>
<attribute type="TelephoneBill" required="no"/>
<attribute type="FaxBill" required="no"/>
<attribute type="EmailBill" required="no"/>
<attribute type="Comment" required="no"/>
<attribute type="Comment2" required="no"/>
<attribute type="TotalAmount" required="no"/>
<attribute type="TotalShippingCharge" required="no"/>
<attribute type="TotalTax1" required="no"/>
<attribute type="TotalTaxRate1" required="no"/>
<attribute type="TotalTax2" required="no"/>
<attribute type="TotalTaxRate2" required="no"/>
<attribute type="TotalTax3" required="no"/>
<attribute type="TotalTaxRate3" required="no"/>
<attribute type="TotalwTax" required="no"/>
<attribute type="CurrencyCode" required="no"/>
<attribute type="ShipComplete" required="no"/>
<attribute type="CustomerClientID" required="no"/>
<attribute type="StoreID" required="no"/>
<attribute type="ThirdPartyAccount" required="no"/>
<attribute type="ClientPOType" required="no"/>
<attribute type="ClientDepartment" required="no"/>
<attribute type="ShipmentLabelFormat" required="no"/>
<attribute type="PODRequired" required="no"/>
<attribute type="AppointmentRequired" required="no"/>
<attribute type="ExpectedReceiptDate" required="no"/>
<attribute type="CODValue" required="no"/>
<attribute type="TotalItems" required="no"/>
<attribute type="TotalQty" required="no"/>
<attribute type="TransmissionID" required="no"/>
<attribute type="Comment3" required="no"/>
</ElementType><ElementType name="Detail" content="empty" model="closed">
<b:RecordInfo tag_name="|DET|," structure="delimited" delimiter_type="hex" delimiter_value="0x2c" field_order="infix" escape_type="hex" escape_value="0x7e" append_newline="no" skip_CR="no" skip_LF="yes"/>
<AttributeType name="UnitPriceCustom">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="UnitPriceCommercial">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="UnisShippingCharge">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="ShipComplete">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="SerialRequired">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="SerialNumber">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="ReleaseDate">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="RecordType">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="RecordCommand">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="OrderQuantity">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="LineNumber">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="LineID2">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="LineID1">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="ItemGroup">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="Item">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="HSCode">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="CustomerOrder">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="Comment1">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="Comment">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="ClientSkuDescription">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="ClientSKU">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="ChangeReason">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<AttributeType name="CartonConfiguration">
<b:FieldInfo pad_char="0x7c" wrap_char="0x7c"/></AttributeType>
<attribute type="RecordType" required="no"/>
<attribute type="RecordCommand" required="no"/>
<attribute type="ChangeReason" required="no"/>
<attribute type="CustomerOrder" required="no"/>
<attribute type="LineNumber" required="no"/>
<attribute type="Item" required="no"/>
<attribute type="ItemGroup" required="no"/>
<attribute type="OrderQuantity" required="no"/>
<attribute type="ReleaseDate" required="no"/>
<attribute type="UnitPriceCommercial" required="no"/>
<attribute type="UnitPriceCustom" required="no"/>
<attribute type="UnisShippingCharge" required="no"/>
<attribute type="ShipComplete" required="no"/>
<attribute type="SerialNumber" required="no"/>
<attribute type="SerialRequired" required="no"/>
<attribute type="Comment" required="no"/>
<attribute type="Comment1" required="no"/>
<attribute type="LineID1" required="no"/>
<attribute type="LineID2" required="no"/>
<attribute type="HSCode" required="no"/>
<attribute type="ClientSKU" required="no"/>
<attribute type="ClientSkuDescription" required="no"/>
<attribute type="CartonConfiguration" required="no"/>
</ElementType></Schema>
|