Xml XSD嵌套序列标记。这是有效的XSD吗?

Xml XSD嵌套序列标记。这是有效的XSD吗?,xml,xsd,Xml,Xsd,这个XSD片段有效吗 <xs:complexType name="ShippingPointStructure"> <xs:sequence> <xs:element minOccurs="0" maxOccurs="unbounded" ref="DeliveryID" /> <xs:element minOccurs="0" ref="DeliveryDate" /> <xs:sequenc

这个XSD片段有效吗

  <xs:complexType name="ShippingPointStructure">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" ref="DeliveryID" />
      <xs:element minOccurs="0" ref="DeliveryDate" />
      <xs:sequence minOccurs="0" maxOccurs="unbounded">
        <xs:element minOccurs="0" ref="WarehouseID" />
        <xs:element minOccurs="0" ref="LocationID" />
      </xs:sequence>
      <xs:element minOccurs="0" ref="Address" />
    </xs:sequence>
  </xs:complexType>

我从未见过一个序列节点作为另一个序列节点的直接子节点。我在谷歌上搜索了一会儿,但找不到答案。XSD文件已经成功地通过了一些在线验证器——但我怀疑他们只是在检查XML的有效性

有人能建议XML应该是什么样子吗?也许是这样的:

<ShippingPointStructure>
    <DeliveryID></DeliveryID>
    <DeliveryDate></DeliveryDate>

    <WarehouseID></WarehouseID>
    <LocationID></LocationID>
    <WarehouseID></WarehouseID>
    <LocationID></LocationID>
    <WarehouseID></WarehouseID>
    <LocationID></LocationID>

    <Address></Address>
</ShippingPointStructure>

谢谢你的帮助

背景:


这是一份由欧洲政府部门提供的官方XSD文件的片段。我无法联系创建者,因为它是通过多层客户机实现的

是的,模式是有效的,您对其含义的解释是正确的

它类似于DTD内容模型

(ID?, Date?, (Warehouse?, Location?)? Address?)
嵌套序列上的minOccurs=0是多余的,并且使内容模型变得模糊,因为如果一个组可以为空,那么您就无法真正计算它发生的频率。但这种弱模糊性在XSD中是允许的