次の方法で共有


sequence

グループ内の要素がコンテナ要素内で指定したシーケンスで使用されることを要求します。

<sequence
  id = ID 
  maxOccurs = (nonNegativeInteger | unbounded) : 1 
  minOccurs = nonNegativeInteger : 1 
  {any attributes with non-schema Namespace}...>
Content: (annotation?, (element | group | choice | sequence | any)*)
</sequence>

属性

  • id
    この要素の ID。id の値は ID 型である必要があり、この要素を含んでいるドキュメント内で一意である必要があります。

    省略可能です。

  • maxOccurs
    指定できるシーケンスの最大数。値は 0 以上の整数です。最大数で上限を設定しない場合は、文字列 "unbounded" を使用します。

    省略可能です。

  • minOccurs
    指定できるシーケンスの最小数。値は 0 以上の整数です。このシーケンス グループが省略可能であることを指定するには、この属性を 0 に設定します。

    省略可能です。

要素情報

出現回数 グループ内では 1 回。それ以外の場合は無制限。
親要素 groupchoice、sequence、complexTyperestriction (simpleContent)extension (simpleContent)restriction (complexContent)extension (complexContent)
コンテンツ annotationanychoiceelementgroupsequence

sequence 要素内に elephantbeargiraffe の各要素のうちの 0 個以上を指定できる要素 (zooAnimals) の例を次に示します。

<xs:element name="zooAnimals">
      <xs:complexType>
            <xs:sequence minOccurs="0" maxOccurs="unbounded">
               <xs:element name="elephant"/>
               <xs:element name="bear"/>
               <xs:element name="giraffe"/>
            </xs:sequence>
      </xs:complexType>
</xs:element>

参照

XML スキーマ リファレンス (XSD) | XML スキーマの要素

詳細については、http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-sequence で、W3C『XML Schema Part 1: Structures Recommendation』を参照してください。