포함하는 요소 내에서 지정된 시퀀스에 그룹에 있는 요소를 표시해야 합니다.
<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으로 설정합니다.선택적 항목입니다.
요소 정보
발생 횟수 |
그룹 내에서 한 번 발생하며 그 외의 경우에는 제한이 없습니다. |
부모 요소 |
group, choice, sequence, complexType, restriction (simpleContent), extension (simpleContent), restriction (complexContent), extension (complexContent) |
내용 |
annotation, any, choice, element, group, sequence |
예제
다음 예제에서는 sequence 요소에서 elephant, bear, giraffe 요소 중에 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>
관련 자료
자세한 내용은 www.w3.org/TR/2001/REC-xmlschema-1-20010502/\#element-all에 있는 Structures Recommendation을 참조하십시오.