XSD Data TypesLesson 100Free preview
XSD Numeric
This lesson is part of XML · All levels
Summary
The XML Schema is distinguished by the precision: xs:integer for integers, xs:decimal for exact decimals, and xs:float and xs:double for approximate numbers. Derivatives such as xs:positiveInteger, xs:nonNegativeInteger, and xs:byte limit the range at once. Note that decimal values use dots, not commas, and should not contain the denominator of thousands.
Key points
- xs:integer for integers and xs:decimal for exact decimals
- xs:float and xs:double support scientific notation such as 1.2E+3
- xs:positiveInteger, xs:nonNegativeInteger, xs:short limiting the range
- The decimal point is 1234.56, not 1234.56.
- Facet totalDigits and fractionDigits limit the accuracy of numbers
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.