0
我試圖以任何順序具有這些子元素中的任何一個。但我也想要允許任何其他元素。當我添加一個沒有在選擇列表中定義的新元素時,出現驗證錯誤「元素在元素下不允許」。0 .. *任何訂單中的「任何」子元素的子元素
<?xml version="1.0" encoding="utf-8" ?>
<xsd:schema targetNamespace="http://www.w3.org/2005/Atom" elementFormDefault="qualified"
attributeFormDefault="unqualified"
xmlns:atom="http://www.w3.org/2005/Atom" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:annotation>
<xsd:documentation>
This version of the Atom schema is based on version 1.0 of the format specifications,
found here http://www.atomenabled.org/developers/syndication/atom-format-spec.php.
</xsd:documentation>
</xsd:annotation>
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/03/xml.xsd" />
<xsd:annotation>
<xsd:documentation>
An Atom document may have two root elements, feed and entry, as defined in section 2.
</xsd:documentation>
</xsd:annotation>
<xsd:element name="feed" type="atom:feedType"/>
<xsd:element name="entry" type="atom:entryType"/>
...
<xsd:complexType name="feedType">
<xsd:annotation>
<xsd:documentation>
The Atom feed construct is defined in section 4.1.1 of the format spec.
</xsd:documentation>
</xsd:annotation>
<xsd:choice minOccurs="3" maxOccurs="unbounded">
<xsd:element name="author" type="atom:personType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="category" type="atom:categoryType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="contributor" type="atom:personType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="generator" type="atom:generatorType" minOccurs="0" maxOccurs="1" />
<xsd:element name="icon" type="atom:iconType" minOccurs="0" maxOccurs="1" />
<xsd:element name="id" type="atom:idType" minOccurs="1" maxOccurs="1" />
<xsd:element name="link" type="atom:linkType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="logo" type="atom:logoType" minOccurs="0" maxOccurs="1" />
<xsd:element name="rights" type="atom:textType" minOccurs="0" maxOccurs="1" />
<xsd:element name="subtitle" type="atom:textType" minOccurs="0" maxOccurs="1" />
<xsd:element name="title" type="atom:textType" minOccurs="1" maxOccurs="1" />
<xsd:element name="updated" type="atom:dateTimeType" minOccurs="1" maxOccurs="1" />
<xsd:element name="entry" type="atom:entryType" minOccurs="0" maxOccurs="unbounded" />
<xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
<xsd:attributeGroup ref="atom:commonAttributes"/>
</xsd:complexType>