Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- architecture
- DB
- Algorithm
- web
- DoM
- Java
- MIPS
- DS
- CSS
- function
- for
- Pipelining
- php
- javascript
- github
- html
- Linux
- mysql
- computer
- instruction
- data structure
- system
- MacOS
- Class
- python
- while
- DATAPATH
- control
- XML
- react
Archives
- Today
- Total
YYYEJI
[XML] XSD restriction의 enumeration 본문
728x90
XSD 제한(facets)
XSD에서 XML 요소나 속성을 선언할 때,
해당 요소나 속성이 가질 수 있는 값에 대한 범위를 제한할 수 있습니다
Simple type을 사용하시면 됩니다.
enumeration 은
단순 타입 요소의 값을 특정 값 중에서 선택하도록 제한하고자 할 때 사용합니다.
값으로 설정할 수 있는 허용된 값들의 리스트를 명시합니다.
<xs:element name="car">
<xs:simpleType>
<xs:restriction base="string">
<xs:enumeration value="Audi"/>
<xs:enumeration value="Golf"/>
<xs:enumeration value="BMW"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
✓ car element는 Audi, Golf, BMW 중 하나만 사용될 수 있습니다.
◡̈
'HTML(or XML) & CSS & JavaScript' 카테고리의 다른 글
[XML] XSD restriction의 pattern (0) | 2022.10.09 |
---|---|
[XML] XSD restriction의 whiteSpace (0) | 2022.10.09 |
[XML] XSD restriction의 minInclusive와 maxInclusive (0) | 2022.10.09 |
[XML] XSD의 default와 fixed (0) | 2022.10.09 |
[DTD] Entity 선언하기 (0) | 2022.10.08 |