Flat File Schema Truncating Spaces From Data

Home Page Forums BizTalk 2004 – BizTalk 2010 Flat File Schema Truncating Spaces From Data

Viewing 1 reply thread
  • Author
    Posts
    • #17124

      I have a flat file, each line in the file is 155 characters long. I have a simple flat file schema to read in the file and wrap each line with <Requirement>line of text</Requirement>

      This works except each line of the file ends in a space, the 155th character is a space. For some reasons the resulting XML removes the space so each record is only 154 characters long.

      As you can see from the schema below, I tried min_length_with_pad="155" pad_char_type="hex" pad_char="0x20" but this did not seem to do anything

      The schema is…
        <?xml version="1.0" encoding="utf-16" ?>
      – <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns:xs="http://www.w3.org/2001/XMLSchema">
      – <xs:annotation>
      – <xs:appinfo>
        <b:schemaInfo count_positions_by_byte="false" parser_optimization="speed" lookahead_depth="3" suppress_empty_nodes="false" generate_empty_nodes="true" allow_early_termination="false" standard="Flat File" root_reference="D075File" />
        <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="D075File">
      – <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="postfix" 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 maxOccurs="unbounded" name="Requirement" type="xs:string">
      – <xs:annotation>
      – <xs:appinfo>
        <b:fieldInfo sequence_number="1" justification="left" min_length_with_pad="155" pad_char_type="hex" pad_char="0x20" />
        </xs:appinfo>
        </xs:annotation>
        </xs:element>
        </xs:sequence>
        </xs:complexType>
        </xs:element>
        </xs:schema>

      There are 10 kinds of people, those who understand binary and those that don't
      There's no place like 127.0.0.1
      ================================
      3.14159 + Ice Cream = Pi ala mode

    • #17454

      The flat file disassembler will remove any pad characters from the data. Defining a pad character on 0x20 will cause the disassembler to remove any trailing spaces from the record.

      Try resetting the pad character property  

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.