HTML and CSS Reference

In-Depth Information

The <element> tag in the XSD must have a data type. Table H-11 shows the most

common data types.

Table H-11 XSD Data Types

Data Types

Description

AnyURI

A valid URI Internet address

Binary

A set of binary codes in groups of eight

Boolean

Binary logic of true or false, yes or no, on or off, or 1 or 0

Date

Represent the date as YYYY-MM-DD

Decimal

Data is any number that contains a decimal fraction

Integer

Data is any whole number not a fraction

String

Data is any set of characters

Data types can have constraints or facets. These values further define restrictions

or validations for the data contained within an XML element beyond whether it is a string

or a numeric value. For example, to specifically define acceptable values in an element,

enumeration constraint is used to list acceptable values. Table H-12 shows the common

constraints or facets.

Table H-12 Constraints or Facets

Data Type Constraints

Description

enumeration

A list of acceptable values

fractionDigits

Defines the maximum number of decimal places and value must be equal

to or greater than zero

length

Explicitly states the number of characters or list items allowed and must be

equal to or greater than zero

maxExclusive

The numeric values for the upper bound for a domain

maxInclusive

Defines the upper bounds for numeric values

maxLength

Defines the maximum number of characters or list items allowed and the value

must be equal to or greater than zero

minExclusive

The numeric values for the lower bounds

minInclusive

Defines the lower bounds for numeric values

minLength

Defines the minimum number of characters or list items allowed and the value

must be equal to or greater than zero

pattern

Defines the exact sequence of characters that are acceptable

totalDigits

Defines the number of digits allowed and must be greater than zero

whiteSpace

Defines line feeds, tabs, spaces, and carriage returns