Next Up Previous Contents
Next: 3.5.2 Paper-only and web-only variants
Up: 3.5 Marked sections
Previous: 3.5 Marked sections
[ID index][Keyword index]

3.5.1 CDATA marked sections

Within the cdata marked section, parsing is switched off, so that angle brackets, <, and ampersands, &, are no longer recognised as introducing markup and entity references.

You will typically use a CDATA marked section to delimit verbatim text. The code and verbatim elements (see Appendix C.1.13 and Appendix C.1.78) do not make any provision to switch off parsing of the text within them. If the text would be significant to the parser - that is, if it contains angle brackets or ampersands - you must either escape those characters by giving them as entity references &lt; or &amp;, or else enclose the contents in a CDATA marked section as follows.

<verbatim><![ CDATA [
Here is some <em>marked-up</em> text
which will be skipped & ignored
]]></verbatim>
Within a CDATA marked section, no markup is recognised except the ]]> which closes the marked section; thus element start- and end-tags are not parsed, and entity references not expanded.


Next Up Previous Contents
Next: 3.5.2 Paper-only and web-only variants
Up: 3.5 Marked sections
Previous: 3.5 Marked sections
[ID index][Keyword index]
The Starlink SGML Set
Starlink System Note 70
Norman Gray, Mark Taylor
21 April 1999. Release DR-0.7-13. Last updated 24 August 2001