Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6017959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:12:16+00:00 2026-05-23T03:12:16+00:00

Hiyas. I have a customer sending orders to us in a flat file. There

  • 0

Hiyas. I have a customer sending orders to us in a flat file. There isn’t really any complexity to the file but there are some inconsistencies from file to file.

The format of the file is like this:

1,2,3[CRLF]
1,2,3[CRLF]

No problems creating a schema around that structure, however from time to time they will add a new column.

1,2,3,4[CRLF]
1,2,3,4[CRLF]

Unfortunatly, they don’t make their changes cascade backwards so we hare expected to support both the 3 and 4 column formats. Both formats can potentially come through the same pipeline, so i don’t really have the option of creating seperate schemas/pipelines. They do always add the new fields to the end of the row, so that much at least is consistent.

The only thiing i can think of to do is to create an elaborate “figure out which schema applies and route accordingly pipeline component”, but before I go down that road I wanted to see if maybe anyone had some thoughts on way to make it work with a single flat file schema (I tried to set the minOccurs property of the optional columns to 0, but that was no good).

Thanks in advance for any advice.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:12:17+00:00Added an answer on May 23, 2026 at 3:12 am

    One way would be to define a “outer” schema and import schemas for the different versions you need to support. The “outer” schema will offer a choice block containing references to your imported version schemas.

    If you need to add the next version you just have to import a new schema and add it to the choice.

    The hard part of course is how you can determine how to process different versions. Maybe the simplest way would be to create a map for every dedicated type you need to handle. On the other hand you could extend a “latest-and-greatest” internal message type and decide based on message content.

    “outer” schema

    <!-- language: xml-schema -->
    
    <?xml version="1.0" encoding="utf-16"?>
    <xs:schema xmlns:ns0="http://ACME.Version_001" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://ACME.Outer" xmlns:ns1="http://ACME.Version_002" targetNamespace="http://ACME.Outer" xmlns:xs="http://www.w3.org/2001/XMLSchema">
        <xs:import schemaLocation=".\version_002.xsd" namespace="http://ACME.Version_002" />
        <xs:import schemaLocation=".\version_001.xsd" namespace="http://ACME.Version_001" />
        <xs:annotation>
            <xs:appinfo>
                <b:schemaInfo standard="Flat File" root_reference="Root" />
                <schemaEditorExtension:schemaInfo namespaceAlias="b" extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension" standardName="Flat File" xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" />
                <b:references>
                    <b:reference targetNamespace="http://ACME.Version_001" />
                    <b:reference targetNamespace="http://ACME.Version_002" />
                </b:references>
            </xs:appinfo>
        </xs:annotation>
        <xs:element name="Root">
            <xs:annotation>
                <xs:appinfo>
                    <b:recordInfo structure="delimited" sequence_number="1" child_delimiter_type="hex" child_order="postfix" child_delimiter="0x0D 0x0A" />
                </xs:appinfo>
            </xs:annotation>
            <xs:complexType>
                <xs:sequence>
                    <xs:choice minOccurs="1">
                        <xs:element ref="ns0:Version_001">
                            <xs:annotation>
                                <xs:appinfo>
                                    <b:recordInfo sequence_number="1" structure="delimited" />
                                </xs:appinfo>
                            </xs:annotation>
                        </xs:element>
                        <xs:element ref="ns1:Version_002">
                            <xs:annotation>
                                <xs:appinfo>
                                    <b:recordInfo sequence_number="2" structure="delimited" />
                                </xs:appinfo>
                            </xs:annotation>
                        </xs:element>
                    </xs:choice>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
    </xs:schema>
    

    Imported schema “Version_001”

    <!-- language: xml-schema -->
    
    <?xml version="1.0" encoding="utf-16"?>
    <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://ACME.Version_001" targetNamespace="http://ACME.Version_001" xmlns:xs="http://www.w3.org/2001/XMLSchema">
        <xs:annotation>
            <xs:appinfo>
                <b:schemaInfo standard="Flat File" root_reference="Version_001" />
                <schemaEditorExtension:schemaInfo namespaceAlias="b" extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension" standardName="Flat File" xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" />
            </xs:appinfo>
       </xs:annotation>
       <xs:element name="Version_001">
           <xs:annotation>
               <xs:appinfo>
                   <b:recordInfo structure="delimited" child_delimiter_type="char" child_order="infix" rootTypeName="Version_001" child_delimiter="," />
               </xs:appinfo>
           </xs:annotation>
           <xs:complexType>
               <xs:sequence>
                   <xs:element name="Col1" type="xs:string" />
                   <xs:element name="Col2" type="xs:string" />
                   <xs:element name="Col3" type="xs:string" />
               </xs:sequence>
           </xs:complexType>
       </xs:element>
    </xs:schema>
    

    Imported schema “Version_002”

    <!-- language: xml-schema -->
    
    <?xml version="1.0" encoding="utf-16"?>
    <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://ACME.Version_002" targetNamespace="http://ACME.Version_002" xmlns:xs="http://www.w3.org/2001/XMLSchema">
        <xs:annotation>
            <xs:appinfo>
                <b:schemaInfo standard="Flat File" root_reference="Version_002" />
                <schemaEditorExtension:schemaInfo namespaceAlias="b" extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension" standardName="Flat File" xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" />
            </xs:appinfo>
       </xs:annotation>
       <xs:element name="Version_002">
           <xs:annotation>
               <xs:appinfo>
                   <b:recordInfo structure="delimited" child_delimiter_type="char" child_order="infix" rootTypeName="Version_001" child_delimiter="," />
               </xs:appinfo>
           </xs:annotation>
           <xs:complexType>
               <xs:sequence>
                   <xs:element name="Col1" type="xs:string" />
                   <xs:element name="Col2" type="xs:string" />
                   <xs:element name="Col3" type="xs:string" />
                   <xs:element name="Col4" type="xs:string" />
               </xs:sequence>
           </xs:complexType>
       </xs:element>
    </xs:schema>
    

    (some default attributes omitted for readability)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hiya, i have the following code but when i try and create a new
Hiya - quick one - is there any harm / value in subclassing JComponent
Hiya I just want to do some windows script host scripts, and I know
When I initiate a class in Python, I give it some values. I then
I have a grid that when I click the refresh button, it does nothing.
I have a page with lots of comments. The code structure is as follows:
hiya i have a massive job trying to sort thousands of records all is
I have main.c, snmpy.c, snmpy.o, and a makefile. I running this on a Linux
I'm a c++ n00b and I'm not sure if I have looked in the
Hiya! I was wondering if anyone knows of some good Android Animation XML examples

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.