|
| Hi Simon,
I have attached the xml for a schema which splits it into two messages. Note
that the Group Max Occurrs on the record element is set to 1 and the Max
Occurrs on the Data element is set to 1.
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
xmlns="http://DelimetedFlatFile.SourceDelimited"
targetNamespace="http://DelimetedFlatFile.SourceDelimited"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:appinfo>
<schemaEditorExtension:schemaInfo namespaceAlias="b"
extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension"
standardName="Flat File"
xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" />
<b:schemaInfo standard="Flat File" codepage="65001" default_pad_char="
" pad_char_type="char" count_positions_by_byte="false"
parser_optimization="speed" lookahead_depth="3" suppress_empty_nodes="false"
generate_empty_nodes="true" allow_early_termination="false"
early_terminate_optional_fields="false"
allow_message_breakup_of_infix_root="false" compile_parse_tables="false"
root_reference="Record" />
</xs:appinfo>
</xs:annotation>
<xs:element name="Record">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="hex"
child_delimiter="0xD 0xA" child_order="postfix" sequence_number="1"
preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false"
/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence maxOccurs="1">
<xs:annotation>
<xs:appinfo>
<groupInfo sequence_number="0"
xmlns="http://schemas.microsoft.com/BizTalk/2003" />
</xs:appinfo>
</xs:annotation>
<xs:element maxOccurs="1" name="Data">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited"
child_delimiter_type="char" child_delimiter="," child_order="infix"
sequence_number="1" preserve_delimiter_for_empty_data="true"
suppress_trailing_delimiters="false" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<groupInfo sequence_number="0"
xmlns="http://schemas.microsoft.com/BizTalk/2003" />
</xs:appinfo>
</xs:annotation>
<xs:element name="IDNumber" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Name" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Good Luck,
Gary
"ee@ee.demon.co.uk" wrote:
> Hi Gary,
>
> Thanks for taking the time to reply (I really appreciate it).
>
> I have positional examples that work, i.e. split the flat file into separate
> output xml files. I can event get a xml input file and split that into
> separate xml output files.
>
> But I cannot get the same thing to work with delimited flat file. I can get
> it to create an XML output file containing all the line of the input flat
> file.
>
> The input file is:
>
> 1,sid
> 2,jack
>
> I have Max Occurs set to 1.
>
> Is that the only thing you need to do to split the above file?
>
> I have attached a work doc containing screenshots of:
> Schema structure
> Schema Properties
> Xml output file created
>
> I am using Biztalk 2006
>
> I you can knock up a quick example it would be appreciated. I.e. just the
> schema to split:
> 1,sid
> 2,jack
>
> I am trying to create a demo for a company.
>
> Regards,
> Simon
>
>
>
|
|