DTD

Friday, 6 July 2012

Enumerated Attribute Values


Enumerated Attribute Values

Syntax

<!ATTLIST element-name attribute-name (en1|en2|..) default-value>

Example

DTD:
<!ATTLIST payment type (check|cash) "cash">

XML example:
<payment type="check" />
or
<payment type="cash" />

Use enumerated attribute values when you want the attribute value to be one of a fixed set of legal values.

Posted by Unknown at 08:34
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

TOPICS

  • ▼  2012 (34)
    • ▼  July (34)
      • EMBEDDED IMAGES
      • FPI
      • MUST READ
      • DTD Validation
      • Turn Validation Off
      • An Internal Entity Declaration
      • An External Entity Declaration
      • Use of Elements vs. Attributes
      • Declaring Attributes
      • A Default Attribute Value
      • #REQUIRED
      • #IMPLIED
      • #FIXED
      • Enumerated Attribute Values
      • Empty Elements
      • Declaring Elements
      • Elements with Parsed Character Data
      • Elements with any Contents
      • Elements with Children (sequences)
      • Declaring Only One Occurrence of an Element
      • Declaring Minimum One Occurrence of an Element
      • Declaring Zero or More Occurrences of an Element
      • Declaring either/or Content
      • DECLARING MIXED CONTENT
      • The Building Blocks of XML Documents
      • ELEMENTS
      • ATTRIBUTES
      • ENTITIES
      • PCDATA
      • CDATA
      • WHY
      • External DTD Declaration
      • Internal DTD Declaration
      • PURPOSE

About Me

Unknown
View my complete profile
Powered by Blogger.