| Diana Wells 2006-06-14, 1:18 pm |
| I have an inbound schema defined for BizTalk 2004 that accepts a flat file
with 1 positional record and then 1 or more comma-delimited records. This
schema is working for all but one condition.
When a file is received that has an incomplete delimited record (not enough
comma-delimited fields), I do not receive an "invalid format" error of any
kind. The file is parsed until all child fields for the short record are
filled, completely ignoring the 0x0D 0x0A end-of-record delimiter and using
fields from the next record in the file.
The root schema is defined as delimited with child node delimiter set as
post-fix, hex, 0x0D 0x0A. The record node is defined as child node delimited
infix, char, comma and all of the child attributes of the record are set as
Use Required. The custom pipeline used to receive this file has the
"Validate document content" parameter set to True.
How do I get the pipeline and schema to recognize missing fields in a
delimited flat file record?
Schema format:
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:ns0="<removed>" xmlns:schemaEditorExtension="<removed>"
xmlns="<removed>" xmlns:b="<removed>" targetNamespace="<removed>"
xmlns:xs="<removed>">
<xs:import schemaLocation="<removed>" namespace="<removed>" />
<xs:annotation>
<xs:appinfo>
<b:schemaInfo count_positions_by_byte="false" standard="Flat File"
root_reference="schemaName" />
<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="<removed>" />
</b:references>
</xs:appinfo>
</xs:annotation>
<xs:element name="schemaName">
<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" />
<b:properties>
<b:property distinguished="true"
xpath="/*[local-name()='schemaName' and
namespace-uri()='<removed>']/*[local-name()='<removed>' and
namespace-uri()='<removed>']/@*[local-name()='fileclassification' and
namespace-uri()='']" />
</b:properties>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
<xs:element ref="<removed>">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="positional"
preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false"
sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="1" maxOccurs="unbounded" name="Record">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited"
preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false"
child_delimiter_type="char" child_delimiter="," sequence_number="2"
child_order="infix" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:attribute name="c" type="xs:string" use="required">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:attribute>
:
: [attribute sequence_number 2 - 36 identical format]
:
<xs:attribute name="factor30" type="xs:string" use="required">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="37" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Custom Pipeline Excerpt:
<Component>
<Name>Microsoft.BizTalk.Component.FFDasmComp</Name>
<ComponentName>Flat file disassembler</ComponentName>
<Description>Streaming flat file disassembler
component</Description>
<Version>1.0</Version>
<Properties>
<Property Name="HeaderSpecName" />
<Property Name="DocumentSpecName">
<Value xsi:type="xsd:string"><removed>, Schemas,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=<removed></Value>
</Property>
<Property Name="TrailerSpecName" />
<Property Name="PreserveHeader">
<Value xsi:type="xsd:boolean">false</Value>
</Property>
<Property Name="ValidateDocumentStructure">
<Value xsi:type="xsd:boolean">true</Value>
</Property>
</Properties>
<CachedDisplayName>Flat file disassembler</CachedDisplayName>
<CachedIsManaged>true</CachedIsManaged>
</Component>
--
Diana Wells
Accenture IMS
|