4.4. Defining Attributes in DTDs
Attributes provide additional information about elements and can be used for a wide variety of tasks. They make it possible to define the relationships between elements, no matter where they appear in the document. You can declare all attributes for an element in one declaration, or you can declare the attributes via several element declarations.
Start tags and empty element tags can contain attributes, which take the form of name–value pairs separated by an equals sign (“=”). “<!ATTLIST>” declares an attribute in the DTD. To declare attributes in the DTD, use the following general format:
<!ATTLIST ELEMENT_NAME ATTRIBUTE_NAME TYPE DEFAULT_VALUE>
ELEMENT_NAME is the name of the element in which the attribute ...
Get Secure XML: The New Syntax for Signatures and Encryption now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.