グループ内の要素をコンテナ要素内に任意の順序で含める、または含めないようにできます。
<all
id = ID
maxOccurs= 1: 1
minOccurs= (0 | 1): 1
{any attributes with non-schema Namespace...}>
Content: (annotation?, element*)
</all>
属性
id
この要素の ID。id の値は ID 型である必要があり、この要素を含んでいるドキュメント内で一意である必要があります。省略可能です。
maxOccurs
指定できる要素最大出現回数。値は 1 である必要があります。省略可能です。
minOccurs
指定できる要素の最小出現回数。値として整数 1 を指定できます。この要素が省略可能であることを指定するには、この属性を 0 に設定します。既定値は 1 です。省略可能です。
要素情報
出現回数 | 1 回 |
親要素 | group、restriction (simpleContent)、extension (simpleContent)、restriction (complexContent)、extension (complexContent)、complexType |
コンテンツ | annotation、element |
例
3 つの要素が含まれた all 要素を含む複合データ型を定義する例を次に示します。
<xs:element name="thing1" type="xs:string"/>
<xs:element name="thing2" type="xs:string"/>
<xs:element name="thing3" type="xs:string"/>
<xs:attribute name="myAttribute" type="xs:decimal"/>
<xs:complexType name="myComplexType">
<xs:all>
<xs:element ref="thing1"/>
<xs:element ref="thing2"/>
<xs:element ref="thing3"/>
</xs:all>
<xs:attribute ref="myAttribute"/>
</xs:complexType>
参照
XML スキーマ リファレンス (XSD) | XML スキーマの要素
詳細については、http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-all で、W3C『XML Schema Part 1: Structures Recommendation』を参照してください。