1
정수 나 날짜 중 하나 일 수있는 간단한 요소를 만들어야합니다. 내가 사용해야하는 요소는 score
입니다.XSD에서 단순 유형의 조합?
몇 가지 링크를 살펴 보았지만 이해가되지 않습니다.
예 : how to define xsd element with multiple option?
https://www.w3schools.com/xml/schema_simple.asp
정수 나 날짜 중 하나 일 수있는 간단한 요소를 만들어야합니다. 내가 사용해야하는 요소는 score
입니다.XSD에서 단순 유형의 조합?
몇 가지 링크를 살펴 보았지만 이해가되지 않습니다.
예 : how to define xsd element with multiple option?
https://www.w3schools.com/xml/schema_simple.asp
사용 xsd:union
조합으로 구성된 새로운 유형을 만들 수있는 다른 xs:integer
및 xs:date
의 :
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="score">
<xs:simpleType>
<xs:union memberTypes="xs:integer xs:date"/>
</xs:simpleType>
</xs:element>
</xs:schema>