E.5. Selected Datatypes Used in Schema Documents

datatype:

A class defined as a simple type. A simple type (or datatype) is, on the one hand, a class that restricts character strings, and, on the other hand, a mapping of those character strings to objects such as numbers or dates or strings. See Chapter 12 for a discussion of all of the datatypes defined in the Schema Recommendation, and Chapter 10 for a discussion of the mechanisms for deriving user-defined simple types from the built-in datatypes.

‘Datatype’ and ‘simple type’ are essentially synonyms. Often in this book we use datatype when talking about the built-in datatypes defined in the Schema Recommendation and ‘simple type’ when talking about user-defined datatypes. Alternatively you may find ‘simple type’ used when discussing the classes that constrain character- string values in an XML document, and ‘datatype’ when discussing those lexical representations and the abstract values they represent.

name:

A character string that conforms to the Name production in the Schema Recommendation; it consists of “name characters—letters, digits, colon, underscore, ASCII hyphen, and various Unicode combining and extending characters.” The first character is required to be a letter, underscore, or colon.

NCName:

A name that does not contain a colon character. (The etymology of ‘NCName’ is from “no-colon name” or “non-colonized name”; however, neither of these terms is in common use. NCName is embodied in the NCName datatype, Section 12.3.2.)

QName:

A “qualified name”—the combination of a prefix (an NCName that in the scope of an appropriate namespace declaration determines a namespace), a colon character, and a local name (another NCName). Note that a default namespace might imply a namespace for a QName, in which case the prefix and colon is omitted and the QName is the local name, an NCName. (QName is embodied in the QName datatype, Section 12.4.1. The lexical space of QName consists of QNames; the value space consists of ordered pairs: the corresponding namespace paired with the local name. If the QName is not in the scope of an appropriate namespace declaration, it is necessarily invalid.) Chapter 3 has more to say about namespaces.

For example, a QName might refer to a global element type. Attributes of various schema elements are constrained to have a value that is a QName.

qualified name:

A QName. (In the Namespace Recommendation, ‘qualified name’ is used in text; ‘QName’ is a production nonterminal for the lexical constraint that makes a character string a qualified name. In this book, the Schema Recommendation, and many other texts, the two terms are used interchangeably in text.)

ID:

An NCName that must be unique among all attribute (and element, when schema processing) values asserted to be IDs in an XML document. (ID is a DTD-prescribable attribute structure type, and it is embodied in the ID datatype, Section 12.3.3.)

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.88.249