XML 스키마 simpleContent 요소
❮ 완전한 XML 스키마 참조
정의 및 사용
simpleContent 요소는 텍스트 전용 복합 유형 또는 단순 유형에 대한 확장 또는 제한을 콘텐츠로 포함하고 요소를 포함하지 않습니다.
요소 정보
- 상위 요소: complexType
통사론
<simpleContent
id=ID
any attributes
>
(annotation?,(restriction|extension))
</simpleContent>
(? 기호는 해당 요소가 simpleContent 요소 내에서 0번 또는 1번 발생할 수 있음을 선언합니다.)
Attribute | Description |
---|---|
id | Optional. Specifies a unique ID for the element |
any attributes | Optional. Specifies any other attributes with non-schema namespace |
실시예 1
다음은 텍스트 전용을 포함하는 XML 요소(<shoesize>)의 예입니다.
<shoesize country="france">35</shoesize>
다음 예제에서는 해당 내용이 정수 데이터 유형으로 정의되고 국가 속성이 있는 complexType "shoesize"를 선언합니다.
<xs:element name="shoesize">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:integer">
<xs:attribute name="country" type="xs:string" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
❮ 완전한 XML 스키마 참조