- Introducing Datatypes
- Primitive Datatypes
- Constraining Facets
- Built-in Derived Datatypes
- Defining Your Own Datatypes
Built-in Derived Datatypes
The primitive datatypes can serve as the basis for deriving your own datatypes. In fact, you can even derive new types from derived types. However, a number of types are so common or necessary for compatibility that the Recommendation defines a number of built-in derived datatypes. Here are some of the derived datatypes included by the W3C:
IDThe ID type represents an ID, as defined in DTDs in compliance with the XML 1.0 Recommendation.
IDREFThe IDREF type represents an IDREF (ID reference), as defined in DTDs in compliance with the XML 1.0 Recommendation.
ENTITYThe ENTITY type represents an entity, as defined in DTDs in compliance with the XML 1.0 Recommendation.
NMTOKENThe NMTOKEN type represents an NMTOKEN, as defined in DTDs in compliance with the XML 1.0 Recommendation.
integerThe integer type represents an integer number, very commonly used in any number of applications.
negativeIntegerThe negativeInteger type represents negative integers, restricting the value so that it cannot include positive integers.
positiveIntegerThe positiveInteger type represents positive integers, restricting the value so that it cannot include negative integers.
Again, this is not an exhaustive list, but comprises some of the more common types.