Name

xs:decimal

Synopsis

xs:decimal is the base type for all numeric built-in schema types, except xs:float and xs:double. It represents a base 10 number with any finite number of the digits 0-9 before and after the decimal point. It may be prefixed with either a plus sign or a minus sign. These are all valid values of type xs:decimal:

  • 3.1415292

  • 03.1415292

  • 127

  • +127

  • -128

  • 0.0

  • 0.

  • .0

This type is not conducive to localization. Only European digits can be used, and only a period can be used as a decimal point. Exponential and scientific notation are not supported.

Constraining facets that apply to xs:decimal are minInclusive, maxInclusive, minExclusive, maxExclusive, pattern, enumeration, whiteSpace, fractionDigits, and totalDigits.

Get XML in a Nutshell, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.