Home > Articles > Programming > Java

  • Print
  • + Share This
From the author of

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:

  • ID—The ID type represents an ID, as defined in DTDs in compliance with the XML 1.0 Recommendation.

  • IDREF—The IDREF type represents an IDREF (ID reference), as defined in DTDs in compliance with the XML 1.0 Recommendation.

  • ENTITY—The ENTITY type represents an entity, as defined in DTDs in compliance with the XML 1.0 Recommendation.

  • NMTOKEN—The NMTOKEN type represents an NMTOKEN, as defined in DTDs in compliance with the XML 1.0 Recommendation.

  • integer—The integer type represents an integer number, very commonly used in any number of applications.

  • negativeInteger—The negativeInteger type represents negative integers, restricting the value so that it cannot include positive integers.

  • positiveInteger—The 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.

  • + Share This
  • 🔖 Save To Your Account