2016-12-28 9 views
0

出力ファイルスキーマを作成しようとしていますが、これは以下の形式である必要があります。OutPutファイルのスキーマを作成

MEMBER,1,134,134,Jo, ,Arch,1,S,M 
BENEFIT,1,M,1,89,7,1,1,20110101,20120731,11 
BENEFIT,1,D,2,89,3,11,5,20110101,20120731,16 
MEMBER,14,448,448,Cli,M,Ast,1,M,M 
BENEFIT,14,D,2,89,3,11,5,20170101,17000101,16 
BENEFIT,14,M,1,89,7,1,1,20170101,17000101,11 
BENEFIT,14,M,1,89,7,1,1,20150101,20161231,11 

だからフラットファイルスキーマでは、私は2つの(最大として1で発生)メンバーのレコード1とベネフィット(最大は無制限に起こる)のための1つを作成する必要がありますか? enter image description here

アム私にそれをやって右

+0

あなたのメンバーノードは一度だけ出現するのではないようです。あなたのメンバーレコードの子レコードとしてBenefitを定義し、BenefitとMemberの両方がmaxOccur = unboundedを持つように見えます。 – Zee

答えて

0

は、あなたの入力XMLメッセージには、複数のメンバーが含まれていますか?

もしそうなら、Max Occursを最大メンバー数または無制限数のいずれかに設定したシーケンスグループを追加するとよいでしょう。そして、はい、メンバー= 1と利益無制限。あなたは今まであなたがそう首尾よく行うことができますファイルを解析するために、スキーマを使用する必要がありますので、もしまたあなたがメンバーと利益にタグ識別子を使用する必要があり

Repeating Sequence Schema

は、それぞれMEMBERおよび利益のために設定します。

enter image description here

参照

<?xml version="1.0" encoding="utf-16"?> 
<xs:schema xmlns="http://Scratch.41367483" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://Scratch.41367483" 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="Root" /> 
    </xs:appinfo> 
    </xs:annotation> 
    <xs:element name="Root"> 
    <xs:annotation> 
     <xs:appinfo> 
     <b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0xD 0xA" child_order="postfix" 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:sequence maxOccurs="unbounded"> 
      <xs:annotation> 
      <xs:appinfo> 
       <groupInfo sequence_number="1" xmlns="http://schemas.microsoft.com/BizTalk/2003" /> 
      </xs:appinfo> 
      </xs:annotation> 
      <xs:element name="Member"> 
      <xs:annotation> 
       <xs:appinfo> 
       <b:recordInfo tag_name="MEMBER" structure="delimited" child_delimiter_type="char" child_delimiter="," child_order="prefix" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" sequence_number="1" /> 
       </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 name="EMPLOYEE_ID_01" type="xs:string"> 
        <xs:annotation> 
        <xs:appinfo> 
         <b:fieldInfo justification="left" sequence_number="1" /> 
        </xs:appinfo> 
        </xs:annotation> 
       </xs:element> 
       <xs:element name="Subscriber_ID" type="xs:string"> 
        <xs:annotation> 
        <xs:appinfo> 
         <b:fieldInfo justification="left" sequence_number="2" /> 
        </xs:appinfo> 
        </xs:annotation> 
       </xs:element> 
       <xs:element name="PrimaryID" type="xs:string"> 
        <xs:annotation> 
        <xs:appinfo> 
         <b:fieldInfo justification="left" sequence_number="3" /> 
        </xs:appinfo> 
        </xs:annotation> 
       </xs:element> 
       <xs:element name="F_Name" type="xs:string"> 
        <xs:annotation> 
        <xs:appinfo> 
         <b:fieldInfo justification="left" sequence_number="4" /> 
        </xs:appinfo> 
        </xs:annotation> 
       </xs:element> 
       <xs:element name="M_Initial" type="xs:string"> 
        <xs:annotation> 
        <xs:appinfo> 
         <b:fieldInfo justification="left" sequence_number="5" /> 
        </xs:appinfo> 
        </xs:annotation> 
       </xs:element> 
       <xs:element name="L_Name" type="xs:string"> 
        <xs:annotation> 
        <xs:appinfo> 
         <b:fieldInfo justification="left" sequence_number="6" /> 
        </xs:appinfo> 
        </xs:annotation> 
       </xs:element> 
       <xs:element name="R_Code" type="xs:string"> 
        <xs:annotation> 
        <xs:appinfo> 
         <b:fieldInfo justification="left" sequence_number="7" /> 
        </xs:appinfo> 
        </xs:annotation> 
       </xs:element> 
       <xs:element name="Marital" type="xs:string"> 
        <xs:annotation> 
        <xs:appinfo> 
         <b:fieldInfo justification="left" sequence_number="8" /> 
        </xs:appinfo> 
        </xs:annotation> 
       </xs:element> 
       <xs:element name="Gender" type="xs:string"> 
        <xs:annotation> 
        <xs:appinfo> 
         <fieldInfo sequence_number="9" justification="left" xmlns="http://schemas.microsoft.com/BizTalk/2003" /> 
        </xs:appinfo> 
        </xs:annotation> 
       </xs:element> 
       </xs:sequence> 
      </xs:complexType> 
      </xs:element> 
      <xs:element maxOccurs="unbounded" name="Benefit"> 
      <xs:annotation> 
       <xs:appinfo> 
       <b:recordInfo tag_name="BENEFIT" structure="delimited" child_delimiter_type="char" child_delimiter="," child_order="prefix" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" sequence_number="2" /> 
       </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 name="EMPPLOYEE_ID_02" type="xs:string"> 
        <xs:annotation> 
        <xs:appinfo> 
         <b:fieldInfo justification="left" sequence_number="1" /> 
        </xs:appinfo> 
        </xs:annotation> 
       </xs:element> 
       <xs:element name="L_Code" type="xs:string"> 
        <xs:annotation> 
        <xs:appinfo> 
         <b:fieldInfo justification="left" sequence_number="2" /> 
        </xs:appinfo> 
        </xs:annotation> 
       </xs:element> 
       <xs:element name="E_Number" type="xs:string"> 
        <xs:annotation> 
        <xs:appinfo> 
         <b:fieldInfo justification="left" sequence_number="3" /> 
        </xs:appinfo> 
        </xs:annotation> 
       </xs:element> 
       <xs:element name="C_Number" type="xs:string"> 
        <xs:annotation> 
        <xs:appinfo> 
         <b:fieldInfo justification="left" sequence_number="4" /> 
        </xs:appinfo> 
        </xs:annotation> 
       </xs:element> 
       <xs:element name="Suffix" type="xs:string"> 
        <xs:annotation> 
        <xs:appinfo> 
         <b:fieldInfo justification="left" sequence_number="5" /> 
        </xs:appinfo> 
        </xs:annotation> 
       </xs:element> 
       <xs:element name="Account" type="xs:string"> 
        <xs:annotation> 
        <xs:appinfo> 
         <b:fieldInfo justification="left" sequence_number="6" /> 
        </xs:appinfo> 
        </xs:annotation> 
       </xs:element> 
       <xs:element name="Plan_ID" type="xs:string"> 
        <xs:annotation> 
        <xs:appinfo> 
         <fieldInfo justification="left" sequence_number="7" xmlns="http://schemas.microsoft.com/BizTalk/2003" /> 
        </xs:appinfo> 
        </xs:annotation> 
       </xs:element> 
       <xs:element name="E_Date" type="xs:string"> 
        <xs:annotation> 
        <xs:appinfo> 
         <b:fieldInfo justification="left" sequence_number="8" /> 
        </xs:appinfo> 
        </xs:annotation> 
       </xs:element> 
       <xs:element name="T_Date" type="xs:string"> 
        <xs:annotation> 
        <xs:appinfo> 
         <fieldInfo justification="left" sequence_number="9" xmlns="http://schemas.microsoft.com/BizTalk/2003" /> 
        </xs:appinfo> 
        </xs:annotation> 
       </xs:element> 
       <xs:element name="C_O" type="xs:string"> 
        <xs:annotation> 
        <xs:appinfo> 
         <b:fieldInfo justification="left" sequence_number="10" /> 
        </xs:appinfo> 
        </xs:annotation> 
       </xs:element> 
       </xs:sequence> 
      </xs:complexType> 
      </xs:element> 
     </xs:sequence> 
     </xs:sequence> 
    </xs:complexType> 
    </xs:element> 
</xs:schema> 

注スキーマ:あなたがタグの識別子を使用して行う場合は、プレフィックスに子の順序を変更する必要があり、またはタグ識別子の最初のコマが含まれており、維持しますかそれはインフィクス。

関連する問題