O'Reilly logo

Special Edition Using XML, Second Edition by - et al. David Gulbransen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Classifying Attributes: Attribute Types

Attributes can be classified based on the kind of information that they contain. When you define an attribute in XML, you are really defining the attribute type, or the kind of information that the attribute may legally contain to describe an element. Attributes can be one of three different types: strings, tokenized types, or enumerations.

In the interest of compatibility and to create rules for validation (which we will discuss later in this chapter), there are a number of different types of attributes. Attributes consist of predefined datatypes that can be assigned to your attributes when you are working with a Document Type Definition or an XML Schema.

For example, one attribute type is ID, which is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required