XML 스키마 통합 요소
❮ 완전한 XML 스키마 참조
정의 및 사용
Union 요소는 단순 유형을 지정된 단순 데이터 유형의 값 모음(공집합)으로 정의합니다.
요소 정보
- 상위 요소: simpleType
통사론
<union
id=ID
memberTypes="list of QNames"
any attributes
>
(annotation?,(simpleType*))
</union>
(? 기호는 요소가 통합 요소 내부에서 0 또는 1회 발생할 수 있음을 선언합니다.)
Attribute | Description |
---|---|
id | Optional. Specifies a unique ID for the element |
memberTypes | Optional. Specifies a list of built-in data types or simpleType elements defined in a schema |
any attributes | Optional. Specifies any other attributes with non-schema namespace |
실시예 1
이 예는 두 가지 단순 유형의 결합인 단순 유형을 보여줍니다.
<xs:element name="jeans_size">
<xs:simpleType>
<xs:union memberTypes="sizebyno sizebystring" />
</xs:simpleType>
</xs:element>
<xs:simpleType name="sizebyno">
<xs:restriction base="xs:positiveInteger">
<xs:maxInclusive value="42"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="sizebystring">
<xs:restriction base="xs:string">
<xs:enumeration value="small"/>
<xs:enumeration value="medium"/>
<xs:enumeration value="large"/>
</xs:restriction>
</xs:simpleType>
❮ 완전한 XML 스키마 참조