15.2.21. XSD numeric data type

发布时间 :2025-10-25 12:23:28 UTC      

Decimal data type

The decimal data type is used to specify a numeric value.

The following is an example of a decimal number declaration in a scheme.

<xs:element name="prize" type="xs:decimal"/>

The elements in the document should look like this:

<prize>999.50</prize>

Or something like this:

<prize>+999.5450</prize>

Or something like this:

<prize>-999.5230</prize>

Or something like this:

<prize>0</prize>

Or something like this:

<prize>14</prize>

注意: The maximum number of decimal digits you can specify is 18 digits.

Integer data type

Integer data types are used to specify values that have no decimal components.

The following is an example of an integer declaration in a scheme.

<xs:element name="prize" type="xs:integer"/>

The elements in the document should look like this:

<prize>999</prize>

Or something like this:

<prize>+999</prize>

Or something like this:

<prize>-999</prize>

Or something like this:

<prize>0</prize>

Numeric data type

Note that all of the following data types are derived from decimal data types (except decimal itself)!

First name

Number of seconds

Byte

8-bit integers with plus or minus

Decimal

Decimal number

Int

32-bit integers with plus or minus

Integer

Integer value

Long

64-bit integers with plus or minus

NegativeInteger

Integers that contain only negative values (.,-2,-1.)

NonNegativeInteger

Contains only integers with non-negative values (0,1,2,..)

NonPositiveInteger

Only integers that contain non-positive values (.,-2,-1, 0)

PositiveInteger

Integers containing only positive values (1, 2,..)

Short

16-bit integers with plus or minus

UnsignedLong

64-bit integers without positive or negative

UnsignedInt

32-bit integers without positive or negative

UnsignedShort

16-bit integers without positive or negative

UnsignedByte

An 8-bit integer with no positive or negative

Qualification of numeric data types (Restriction)

Restrictions that can be used with numeric data types:

  • Enumeration

  • FractionDigits

  • MaxExclusive

  • MaxInclusive

  • MinExclusive

  • MinInclusive

  • Pattern

  • TotalDigits

  • WhiteSpace

Principles, Technologies, and Methods of Geographic Information Systems  102

In recent years, Geographic Information Systems (GIS) have undergone rapid development in both theoretical and practical dimensions. GIS has been widely applied for modeling and decision-making support across various fields such as urban management, regional planning, and environmental remediation, establishing geographic information as a vital component of the information era. The introduction of the “Digital Earth” concept has further accelerated the advancement of GIS, which serves as its technical foundation. Concurrently, scholars have been dedicated to theoretical research in areas like spatial cognition, spatial data uncertainty, and the formalization of spatial relationships. This reflects the dual nature of GIS as both an applied technology and an academic discipline, with the two aspects forming a mutually reinforcing cycle of progress.