O'Reilly logo

Secure XML: The New Syntax for Signatures and Encryption by Kitty Niles, Donald E. Eastlake

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

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 ...

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