내가 XML 매핑에서 결과로 플랫 파일에 대한 XSD이 경우에도 CRLF를 생산, 뭔가 같은 :BizTalk 플랫 파일이 빈 데이터
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://mynamespace" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://mynamespace" 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="File" />
</xs:appinfo>
</xs:annotation>
<xs:element name="File">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0x0D 0x0A" 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 minOccurs="0" maxOccurs="unbounded" name="TransactionDate">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0x0D 0x0A" child_order="infix" sequence_number="1" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" repeating_delimiter_type="hex" repeating_delimiter="0x0D 0x0A" />
</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 minOccurs="0" maxOccurs="unbounded" name="Items">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0xD 0xA" child_order="infix" sequence_number="1" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" repeating_delimiter_type="hex" repeating_delimiter="0x0D 0x0A" />
</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 minOccurs="0" maxOccurs="unbounded" name="Item">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="positional" 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>
<!-- My elements here -->
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="1" maxOccurs="1" default="EOF" name="EOF" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="2" justification="left" pos_offset="0" pos_length="3" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
문제는 XML 데이터가있을 때, 우리는 올바른 결과를 가지고 있습니다 뭔가 같은 :
line1
line2
line3
EOF
그러나 우리는 (XML 그냥 단지 네임 스페이스가) 데이터가없는
<ns:SAPFile Channel="Eziemall" xmlns:ns="http://mynamespace" />
플랫 파일은 다음과 같습니다
내 플랫 파일에서 CRLF 제거 할 수있는 방법CRLF (for easy reading)
EOF
, 나는 그냥 첫 번째 줄에 EOF를 원한다.
그냥 추측 : 당신은 혹시, 루트 기록에 줄 바꿈 구분 기호와 후위 구분 기호를해야합니까? 이 접미사 구분 기호는 EOF 앞에 줄 바꿈 문자를 넣습니다. –
@PieterVandenheede 당신은 뭔가있을 수 있습니다 :'preserve_delimiter_for_empty_data = "true"suppress_trailing_delimiters = "false"'는 이것을 토글하는 방법이 있음을 시사합니다. BizTalk 스키마 편집기를 마지막으로 사용한 이후로 나는 확실히 대답 할 수 없었습니다. – Filburt
@PieterVandenheede : 아래는 모든 xsd 파일입니다. (""는 숨기지 않는 것이 중요합니다.) 후위가 전혀 없습니다. – neitcouq