BizTalk Server General - Positional Flat File - Root Element is missing

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > June 2004 > Positional Flat File - Root Element is missing





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Positional Flat File - Root Element is missing
GilesTH

2004-06-20, 11:07 pm

I have a flat file with multiple fields (A, B, & C) followed by a record type (Tag Id = 1) followed field (D).
There can be mulitple occurances of this record type and it is alway followed by a single totalling record which has a similiar structure (A, B, C) TagID 2 field D.

Example structure
ABC1D
ABC1D
ABC2D

When I validate my instance, I get an error message "The Root Element is missing".

Can anyone help!

Sample document contains (. represents blank row)
ABC1D
ABC2D
..

Schema
<?xml version="1.0" encoding="utf-16" ?>
- <xs:schema xmlns="http://www.microsoft.com/Internal/BTSExample" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" elementFormDefault="qualified" targetNamespace="http://www.microsoft.com/Internal/BTSExample" 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 document_type="BTSExample" version="1.0" root_reference="BTSExample" count_positions_by_byte="false" standard="Flat File" />
</xs:appinfo>
</xs:annotation>
- <xs:element name="BTSExample">
- <xs:annotation>
- <xs:appinfo>
<b:recordInfo structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" sequence_number="1" child_delimiter_type="hex" child_delimiter="0x0D 0x0A" child_order="postfix" />
</xs:appinfo>
</xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:annotation>
- <xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
- <xs:element name="ReportHeaderInfo">
- <xs:annotation>
- <xs:appinfo>
<b:recordInfo sequence_number="1" structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" child_delimiter_type="hex" child_delimiter="0x0D 0x0A" child_order="infix" />
</xs:appinfo>
</xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:annotation>
- <xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
- <xs:element maxOccurs="unbounded" name="ReportLine">
- <xs:annotation>
- <xs:appinfo>
<b:recordInfo structure="positional" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" sequence_number="1" tag_name="1" tag_offset="4" />
</xs:appinfo>
</xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:annotation>
- <xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
- <xs:element name="A">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="1" justification="left" pos_length="1" />
</xs:appinfo>
</xs:annotation>
- <xs:simpleType>
<xs:restriction base="xs:string" />
</xs:simpleType>
</xs:element>
- <xs:element name="B" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="2" justification="left" pos_length="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="C" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="3" justification="left" pos_length="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="D" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="4" justification="left" pos_length="1" notes="Need to check what code used for HOF EAN13 barcodes." pos_offset="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="TotalLineInfo">
- <xs:annotation>
- <xs:appinfo>
<b:recordInfo sequence_number="2" structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" child_order="infix" child_delimiter_type="hex" child_delimiter="0x0D 0x0A" />
</xs:appinfo>
</xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:annotation>
- <xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
- <xs:element name="ReportTotal">
- <xs:annotation>
- <xs:appinfo>
<b:recordInfo sequence_number="1" structure="positional" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" tag_name="2" tag_offset="4" />
</xs:appinfo>
</xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:annotation>
- <xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
- <xs:element name="A" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="1" justification="left" pos_length="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="B" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="2" justification="left" pos_length="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="C" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="3" justification="left" pos_length="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="D" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="4" justification="left" pos_length="1" pos_offset="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

David Downing [MSFT]

2004-06-20, 11:07 pm

Try changing the tagOffsets to 3, so they will match the numeric value
rather than the 'D' value.

--
Dave

This posting is provided "AS IS" with no warranties, and confers no rights.

GilesTH

2004-06-20, 11:07 pm

Thanks Dave,

That has worked a treat!

""David Downing [MSFT]"" wrote:

> Try changing the tagOffsets to 3, so they will match the numeric value
> rather than the 'D' value.
>
> --
> Dave
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com