SGML and XML Keywords

 <  Day Day Up  >  


The previous SGML example declares the lang attribute as having values of type NAME , an alphabetic string. NAME is one of several SGML/XML keywords occurring in HTML and XHTML's declarations of an attribute's type:

  • CDATA       Unparsed character data

  • ID       A document-wide unique identifier

  • IDREF       A reference to a document-wide identifier

  • NAME       An alphabetic character string plus a hyphen and a period

  • NMTOKEN       An alphanumeric character string plus a hyphen and a period

  • NUMBER       A character string containing decimal numbers

Notice in early DTD fragment for <bdo> that the dir attribute does not declare its type using a keyword. Instead, the type is specified using an enumerated list containing two possible values, ltr and rtl . In that example for either SGML or XML, the attribute's default behavior is specified with a keyword. A default value may be specified using a quoted string.

  • #REQUIRED       A value must be supplied for the attribute.

  • #IMPLIED       The attribute is optional.

  • #FIXED       The attribute has a fixed value that is declared in quotes using an additional parameter. Because the attribute/value pair is assumed to be constant, it does not need to be used in the document instance.



 <  Day Day Up  >  


HTML & XHTML
HTML & XHTML: The Complete Reference (Osborne Complete Reference Series)
ISBN: 007222942X
EAN: 2147483647
Year: 2003
Pages: 252
Authors: Thomas Powell

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net