Character data sections

When a document author wishes to use characters that could be confused with markup delimiters, such as '<' and '&', it is normal practice to employ the codes introduced earlier (including '&lt;' and '&amp;'). But, if one portion of a document contains many such characters of this type, the use of these codes could be considered very inconvenient. Consider the following example:

Press the &lt;&lt;&lt;ENTER&gt;&gt;&gt; button.


   Press the <<<ENTER>>> button.

The text is difficult to read and interpret. It may also be inconvenient for an author to generate this text, and for software to interpret it quickly. In more extreme cases, a significant impact on the size of the document can even be expected.

It would be useful to be able to identify a range of text that cannot contain markup constructs, so that these significant characters could be used in the data, as normal, without confusing a parser.

It is therefore possible to identify a block of text as character data (data that consists of characters, but not markup). A Character Data Section declaration identifies a character data document segment. The keyword '[CDATA[' begins the declaration, and '] ]>' ends it. As markup characters are not expected in character data, apart from the sequence '] ]>', there is no possibility of confusion when using markup-related characters in the text:

					<![CDATA[Press the <<<ENTER>>> button.] ]>
				


Press the <<<ENTER>>> button.

If escape-codes are present in a character data section, they are not considered to be significant, so are treated as normal character sequences:

<![CDATA[In XML the &lt; reference is built-in.] ]>


In XML the &lt; reference is built-in

SGML Note

The other marked section types, 'IGNORE', 'INCLUDE', 'TEMP' and 'RCDATA' are not available in an XML document instance, though the first two of these are available in the external subset of a DTD.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.168.56