|
Home > Archive > BizTalk Server General > October 2004 > Flat File Validation error
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 |
Flat File Validation error
|
|
| RichTheHSTGuy 2004-10-27, 5:49 pm |
| I'm trying to parse the data about 1/2 down on this page with the following
xsd and when I try I get the error below. I've tried making nillable=true
and MIN and MAX occurs 1 but I still get this error.
XML
<?xml version="1.0" encoding="utf-16" ?>
- <xs:schema xmlns="http://Centricity_FF.Centricity_FF_schema"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
targetNamespace="http://Centricity_FF.Centricity_FF_schema"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xs:annotation>
- <xs:appinfo>
<b:schemaInfo count_positions_by_byte="false" standard="Flat File"
root_reference="Patient" />
<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="Patient">
- <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_order="infix"
child_delimiter="0x0D 0x0A" />
</xs:appinfo>
</xs:annotation>
- <xs:complexType>
- <xs:sequence minOccurs="1" maxOccurs="unbounded">
- <xs:annotation>
- <xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
- <xs:element name="Patient_Info">
- <xs:annotation>
- <xs:appinfo>
<b:recordInfo sequence_number="1" structure="delimited"
preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false"
child_delimiter_type="char" child_order="prefix" child_delimiter=","
tag_name="01" />
</xs:appinfo>
</xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:annotation>
- <xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
- <xs:element name="Medical_Rec_Number" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="1" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Last_Name" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="2" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="First_Name" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="3" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Street_Address1" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="4" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="City" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="5" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="State" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="6" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Zip_Code" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="7" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Phone_Number" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="8" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Data to Parse:
01,23310345,BLA,GEORGE FRANCIS,22829 BHOWALTER
RD,,CYGNE,KS,66040,809-757-2457,,512-23-3156,M,11181919,BLA,JOHN
FRANCIS,22829 BHOWALTER RD,,CYGNE,MO,66080,809-757-2457,,512-23-3156,SAME AS
PAT,FLAT,Stanley P. MD,FLAT,Stanley P. MD,RETIRED,MEDICARE MO OMAHA,PO BOX
1602 SERV TEAM #2,OMAHA,NE,68101,ALA,GEORGE
FRANCIS,547123191A,,INDIVIDUAL,BLA,GEORG
E FRANCIS,22829 BHOWALTER
RD,CYGNE,MO,66080,809-757-2457,11181919,SAME AS PA,BLUE CROSS of KS,PO BOX
419016,KANSAS CITY,MO,64141,BLA,GEORGE FRANCIS,XSM547123191,0800006,PLAN 65
BENEFIT F,ALA,GEORGE FRANCIS,22829 BHOWALTER
RD,LACYGNE,MO,66080,809-757-2457,11181919,SAME
ERROR:
Invoking component...
C:\Interface_Projects\Centricity_FF\flat
files_sj1001.txt: error BEC2004:
Unexpected data found while looking for:
','
The current definition being parsed is Patient_Info. The stream offset where
the error occured is 459.
C:\Interface_Projects\Centricity_FF\Cent
ricity_FF_schema.xsd: error BEC2004:
Validate Instance failed for schema Centricity_FF_schema.xsd, file:
<file:/// C:\Interface_Projects\Centricity_FF\flat
files_sj1001.txt>.
Component invocation succeeded.
| |
| Greg Forsythe 2004-10-28, 7:48 am |
| You seem to have some extraneous data that is not specfied in the schema.
I managed to parse the following with your schema.
01,23310345,BLA,GEORGE FRANCIS,22829 BHOWALTER
RD,CYGNE,KS,66040,809-757-2457
to produce:
<Patient xmlns="http://Centricity_FF.Centricity_FF_schema">
<Patient_Info xmlns="">
<Medical_Rec_Number>23310345</Medical_Rec_Number>
<Last_Name>BLA</Last_Name>
<First_Name>GEORGE FRANCIS</First_Name>
<Street_Address1>22829 BHOWALTER RD</Street_Address1>
<City>CYGNE</City>
<State>KS</State>
<Zip_Code>66040</Zip_Code>
<Phone_Number>809-757-2457</Phone_Number>
</Patient_Info>
</Patient>
I had to delete everthing after the phone number and remove the field
between 'StreetAddress1' and 'City'
You will need to specify all the fields in the schema.
Greg
"RichTheHSTGuy" <RichTheHSTGuy@discussions.microsoft.com> wrote in message
news:C66DC3AA-C7D7-4AEC-A65E-823936A81DFE@microsoft.com...
> I'm trying to parse the data about 1/2 down on this page with the
following
> xsd and when I try I get the error below. I've tried making nillable=true
> and MIN and MAX occurs 1 but I still get this error.
>
> XML
>
> <?xml version="1.0" encoding="utf-16" ?>
> - <xs:schema xmlns="http://Centricity_FF.Centricity_FF_schema"
> xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
> targetNamespace="http://Centricity_FF.Centricity_FF_schema"
> xmlns:xs="http://www.w3.org/2001/XMLSchema">
> - <xs:annotation>
> - <xs:appinfo>
> <b:schemaInfo count_positions_by_byte="false" standard="Flat File"
> root_reference="Patient" />
> <schemaEditorExtension:schemaInfo namespaceAlias="b"
> extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension"
> standardName="Flat File"
>
xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/Schem
aEditorExtensions" />
> </xs:appinfo>
> </xs:annotation>
> - <xs:element name="Patient">
> - <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_order="infix"
> child_delimiter="0x0D 0x0A" />
> </xs:appinfo>
> </xs:annotation>
> - <xs:complexType>
> - <xs:sequence minOccurs="1" maxOccurs="unbounded">
> - <xs:annotation>
> - <xs:appinfo>
> <b:groupInfo sequence_number="0" />
> </xs:appinfo>
> </xs:annotation>
> - <xs:element name="Patient_Info">
> - <xs:annotation>
> - <xs:appinfo>
> <b:recordInfo sequence_number="1" structure="delimited"
> preserve_delimiter_for_empty_data="true"
suppress_trailing_delimiters="false"
> child_delimiter_type="char" child_order="prefix" child_delimiter=","
> tag_name="01" />
> </xs:appinfo>
> </xs:annotation>
> - <xs:complexType>
> - <xs:sequence>
> - <xs:annotation>
> - <xs:appinfo>
> <b:groupInfo sequence_number="0" />
> </xs:appinfo>
> </xs:annotation>
> - <xs:element name="Medical_Rec_Number" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="1" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Last_Name" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="2" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="First_Name" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="3" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Street_Address1" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="4" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="City" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="5" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="State" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="6" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Zip_Code" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="7" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Phone_Number" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="8" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
> Data to Parse:
>
>
> 01,23310345,BLA,GEORGE FRANCIS,22829 BHOWALTER
> RD,,CYGNE,KS,66040,809-757-2457,,512-23-3156,M,11181919,BLA,JOHN
> FRANCIS,22829 BHOWALTER RD,,CYGNE,MO,66080,809-757-2457,,512-23-3156,SAME
AS
> PAT,FLAT,Stanley P. MD,FLAT,Stanley P. MD,RETIRED,MEDICARE MO OMAHA,PO BOX
> 1602 SERV TEAM #2,OMAHA,NE,68101,ALA,GEORGE
> FRANCIS,547123191A,,INDIVIDUAL,BLA,GEORG
E FRANCIS,22829 BHOWALTER
> RD,CYGNE,MO,66080,809-757-2457,11181919,SAME AS PA,BLUE CROSS of KS,PO BOX
> 419016,KANSAS CITY,MO,64141,BLA,GEORGE FRANCIS,XSM547123191,0800006,PLAN
65
> BENEFIT F,ALA,GEORGE FRANCIS,22829 BHOWALTER
> RD,LACYGNE,MO,66080,809-757-2457,11181919,SAME
>
> ERROR:
>
> Invoking component...
> C:\Interface_Projects\Centricity_FF\flat
files_sj1001.txt: error BEC2004:
> Unexpected data found while looking for:
> ','
> The current definition being parsed is Patient_Info. The stream offset
where
> the error occured is 459.
> C:\Interface_Projects\Centricity_FF\Cent
ricity_FF_schema.xsd: error
BEC2004:
> Validate Instance failed for schema Centricity_FF_schema.xsd, file:
> <file:/// C:\Interface_Projects\Centricity_FF\flat
files_sj1001.txt>.
> Component invocation succeeded.
|
|
|
|
|