J2EEOnlineJ2EE





Attributes Entitites   «Prev  Next»
Lesson 3Attribute-list declaration syntax
Objective Declare lists of attributes.

Attribute-list Declaration Syntax

In the DTD, you declare lists of attributes in a manner similar to how you declare elements--by means of an attribute-list declaration.
The MouseOver shows the generic syntax for declaring an attribute, an attribute-list declaration, and an example of attribute usage.
Note the composition of the ID value in the XML file as required by its type:
  attribute list
error-file:tidyout.log

Attribute Syntax Usage.

Attribute types


The table below contains the most commonly-used attribute types.
An IDREF holds the ID value of another element in the document.  It is used to explore any relationships that may exit between different elements in an XML document.
An IDREF holds the ID value of another element in the document. It is used to explore any relationships that may exit between different elements in an XML document.
For any attribute-list declaration, only one attribute can be specified as type ID.
The next lesson defines the entities in a DTD.