CDATA Attribute Type


 

The CDATA Attribute Type is defined by the W3C XML 1.0 Recommendation.
Reference: *W3C - XML 1.0 - Attribute Types

Specific Attributes with Type CDATA

  1. axis:
    This is declared on the elements: th, td
  2. content - #REQUIRED:
    This is declared on the element: meta
  3. name - #REQUIRED:
    This is declared on the element: param
  4. name:
    This is declared on the elements: object, input, textarea, select, button
  5. scheme:
    This is declared on the element: meta
  6. value:
    This is declared on the elements: param, input, option, button

Common Attributes with Type CDATA

From the Core Attribute Collection:
  1. style (deprecated)

Attribute Value for Type CDATA

Arbitrary character data

The CDATA Attribute Type is very similar to the Text Attribute Type, with the only difference being that the Text type is assigned to attributes which hold information intended to be visible to the viewer of the document, whereas the CDATA type is concerned with the internals of the page.

In fact, the Text type and most of the other Attribute Types Defined by XHTML 1.1 are declared within the DTD as having the XML 1.0 CDATA Attribute Type.

Handling Invalid Characters

Within XHTML 1.1 attribute values:
  • Every less-than character (<) within an attribute value must be escaped as &lt; (or &#60;).
  • Every ampersand character (&) which does not denote the start of an entity or character reference (e.g. &lt;) must be escaped as &amp; (or &#38;).
  • Every double quote character (") must be escaped as &quot; (or &#34;) if using double quotes to delimit the attribute value
  • Every single quote character (') must be escaped as &#39; if using single quotes to delimit the attribute value (alternatively &apos; may be used if compatibility with HTML isn't necessary - see Character Entities Predefined by XML 1.0)

Page Footer & Copyright

Copyright © Sally Maughan 2005-2009 (Page last updated on 01 Oct 2009)

*Valid XHTML 1.1 - hosted by *Openstrike

Content based on the W3C Working Draft: *XHTML 1.1 and Recommendation: *XHTML Modularisation 1.1.

W3C, XHTML, XML, HTML, CSS and MathML are *Trademarks of the W3C (*MIT, *ERCIM, *Keio) with which the site's author has no connection.


Up, Next & Previous Links

Your Location

Home > XHTML 1.1 Home > Data Types in XHTML 1.1 > Attribute Types (XHTML 1.1) > CDATA Attribute Type