使用 BizTalk 平面文件架构向导添加子子记录

发布于 2024-12-01 16:13:21 字数 214 浏览 1 评论 0原文

在此处输入图像描述

我正在使用 BizTalk 平面文件架构向导生成 XSD 架构。

我有一个记录元素,其下有很少的属性和一个具有很少属性的子记录。

现在我可以在主记录下添加属性,但如何在其下添加子记录。

请查看附图以获取有关我的问题的更多详细信息。

enter image description here

I am generating an XSD schema using BizTalk Flat File Schema Wizard.

I have Record Element under which there are few Attributes and a child record with few of its attributes.

Now I am able to add the Attributes under the main record but how do I add child record under it.

Please have look at the attached image do get more details of my problem.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

傻比既视感 2024-12-08 16:13:21

我通过进行一些研发得到了我的问题的答案。
这是应该生成的 XSD。

  <?xml version="1.0" encoding="utf-16" ?> 
  <xs:schema xmlns="http://Messaging.Messages.SalesOrder_FF" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://Messaging.Messages.SalesOrder_FF" 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="SalesOrder" /> 
  </xs:appinfo>
  </xs:annotation>
  <xs:element name="SalesOrder">
  <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:element name="OrderDetail">
  <xs:annotation>
  <xs:appinfo>
  <b:recordInfo structure="delimited" child_delimiter_type="char" child_delimiter="," 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="1" maxOccurs="1" name="CreditInfo">
  <xs:annotation>
  <xs:appinfo>
  <b:recordInfo structure="delimited" child_delimiter_type="char" child_delimiter="," child_order="infix" sequence_number="6" 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>
  <xs:attribute name="Employer" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="1" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:attribute>
  <xs:attribute name="MonthsEmployed" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="2" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:attribute>
  <xs:attribute name="PrimaryIncome" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="3" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:attribute>
  <xs:attribute name="OtherIncome" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="4" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:attribute>
  </xs:complexType>
  </xs:element>
  </xs:sequence>
  <xs:attribute name="StoreNumber" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="1" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:attribute>
  <xs:attribute name="OrderNumber" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="2" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:attribute>
  <xs:attribute name="Cash_Cred" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="3" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:attribute>
  <xs:attribute name="EmployeeName" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="4" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:attribute>
  <xs:attribute name="TotalOrder" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="5" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:attribute>
  </xs:complexType>
  </xs:element>
  <xs:element name="CustomerInfo">
  <xs:annotation>
  <xs:appinfo>
  <b:recordInfo structure="positional" sequence_number="2" 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 name="ID" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" pos_offset="0" pos_length="5" sequence_number="1" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:element>
  <xs:element name="CustomerName" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" pos_offset="0" pos_length="24" sequence_number="2" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:element>
  <xs:element name="MonthsAtResidence" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" pos_offset="0" pos_length="5" sequence_number="3" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:element>
  <xs:element name="Address" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" pos_offset="0" pos_length="25" sequence_number="4" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:element>
  <xs:element name="Town" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" pos_offset="0" pos_length="10" sequence_number="5" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:element>
  <xs:element name="State" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" pos_offset="0" pos_length="2" sequence_number="6" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:element>
  <xs:element name="ZipCode" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" pos_offset="0" pos_length="5" sequence_number="7" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:element>
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  <xs:element name="Products">
  <xs:annotation>
  <xs:appinfo>
  <b:recordInfo tag_name="PRODUCTS" structure="delimited" child_delimiter_type="char" child_delimiter="," child_order="prefix" sequence_number="3" 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 maxOccurs="unbounded" name="Product">
  <xs:annotation>
  <xs:appinfo>
  <b:recordInfo tag_name="PRODUCT" structure="delimited" child_delimiter_type="char" child_delimiter="|" child_order="prefix" 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 name="Quantity" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="1" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:element>
  <xs:element name="ItemNumber" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="2" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:element>
  <xs:element name="PriceEach" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="3" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:element>
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  <xs:element name="Comments" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="4" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:element>
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:schema>

I got answer to my question by doing some R&D.
Here is the XSD that should have been generated.

  <?xml version="1.0" encoding="utf-16" ?> 
  <xs:schema xmlns="http://Messaging.Messages.SalesOrder_FF" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://Messaging.Messages.SalesOrder_FF" 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="SalesOrder" /> 
  </xs:appinfo>
  </xs:annotation>
  <xs:element name="SalesOrder">
  <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:element name="OrderDetail">
  <xs:annotation>
  <xs:appinfo>
  <b:recordInfo structure="delimited" child_delimiter_type="char" child_delimiter="," 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="1" maxOccurs="1" name="CreditInfo">
  <xs:annotation>
  <xs:appinfo>
  <b:recordInfo structure="delimited" child_delimiter_type="char" child_delimiter="," child_order="infix" sequence_number="6" 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>
  <xs:attribute name="Employer" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="1" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:attribute>
  <xs:attribute name="MonthsEmployed" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="2" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:attribute>
  <xs:attribute name="PrimaryIncome" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="3" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:attribute>
  <xs:attribute name="OtherIncome" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="4" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:attribute>
  </xs:complexType>
  </xs:element>
  </xs:sequence>
  <xs:attribute name="StoreNumber" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="1" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:attribute>
  <xs:attribute name="OrderNumber" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="2" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:attribute>
  <xs:attribute name="Cash_Cred" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="3" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:attribute>
  <xs:attribute name="EmployeeName" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="4" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:attribute>
  <xs:attribute name="TotalOrder" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="5" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:attribute>
  </xs:complexType>
  </xs:element>
  <xs:element name="CustomerInfo">
  <xs:annotation>
  <xs:appinfo>
  <b:recordInfo structure="positional" sequence_number="2" 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 name="ID" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" pos_offset="0" pos_length="5" sequence_number="1" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:element>
  <xs:element name="CustomerName" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" pos_offset="0" pos_length="24" sequence_number="2" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:element>
  <xs:element name="MonthsAtResidence" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" pos_offset="0" pos_length="5" sequence_number="3" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:element>
  <xs:element name="Address" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" pos_offset="0" pos_length="25" sequence_number="4" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:element>
  <xs:element name="Town" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" pos_offset="0" pos_length="10" sequence_number="5" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:element>
  <xs:element name="State" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" pos_offset="0" pos_length="2" sequence_number="6" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:element>
  <xs:element name="ZipCode" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" pos_offset="0" pos_length="5" sequence_number="7" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:element>
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  <xs:element name="Products">
  <xs:annotation>
  <xs:appinfo>
  <b:recordInfo tag_name="PRODUCTS" structure="delimited" child_delimiter_type="char" child_delimiter="," child_order="prefix" sequence_number="3" 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 maxOccurs="unbounded" name="Product">
  <xs:annotation>
  <xs:appinfo>
  <b:recordInfo tag_name="PRODUCT" structure="delimited" child_delimiter_type="char" child_delimiter="|" child_order="prefix" 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 name="Quantity" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="1" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:element>
  <xs:element name="ItemNumber" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="2" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:element>
  <xs:element name="PriceEach" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="3" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:element>
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  <xs:element name="Comments" type="xs:string">
  <xs:annotation>
  <xs:appinfo>
  <b:fieldInfo justification="left" sequence_number="4" /> 
  </xs:appinfo>
  </xs:annotation>
  </xs:element>
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:schema>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文