XSD 숫자 데이터 유형
10진수 데이터 유형은 숫자 값에 사용됩니다.
10진수 데이터 유형
10진수 데이터 유형은 숫자 값을 지정하는 데 사용됩니다.
다음은 스키마의 10진수 선언의 예입니다.
<xs:element name="price" type="xs:decimal"/>
문서의 요소는 다음과 같습니다.
<price>999.50</price>
또는 다음과 같이 보일 수 있습니다.
<price>+999.5450</price>
또는 다음과 같이 보일 수 있습니다.
<price>-999.5230</price>
또는 다음과 같이 보일 수 있습니다.
<price>0</price>
또는 다음과 같이 보일 수 있습니다.
<price>14</price>
정수 데이터 유형
정수 데이터 유형은 소수 구성요소 없이 숫자 값을 지정하는 데 사용됩니다.
다음은 스키마에서 정수 선언의 예입니다.
<xs:element name="price" type="xs:integer"/>
문서의 요소는 다음과 같습니다.
<price>999</price>
또는 다음과 같이 보일 수 있습니다.
<price>+999</price>
또는 다음과 같이 보일 수 있습니다.
<price>-999</price>
또는 다음과 같이 보일 수 있습니다.
<price>0</price>
숫자 데이터 유형
아래의 모든 데이터 유형은 Decimal 데이터 유형에서 파생됩니다(10진수 자체 제외)!
Name | Description |
---|---|
byte | A signed 8-bit integer |
decimal | A decimal value |
int | A signed 32-bit integer |
integer | An integer value |
long | A signed 64-bit integer |
negativeInteger | An integer containing only negative values (..,-2,-1) |
nonNegativeInteger | An integer containing only non-negative values (0,1,2,..) |
nonPositiveInteger | An integer containing only non-positive values (..,-2,-1,0) |
positiveInteger | An integer containing only positive values (1,2,..) |
short | A signed 16-bit integer |
unsignedLong | An unsigned 64-bit integer |
unsignedInt | An unsigned 32-bit integer |
unsignedShort | An unsigned 16-bit integer |
unsignedByte | An unsigned 8-bit integer |
숫자 데이터 유형에 대한 제한 사항
숫자 데이터 유형에 사용할 수 있는 제한 사항:
- 열거
- fractionDigits
- maxExclusive
- 최대 포함
- minExclusive
- 최소 포함
- 무늬
- 총 자릿수
- 공백