purpose CDATA sections
David Megginson
ak117 at freenet.carleton.ca
Fri Aug 15 17:13:11 BST 1997
Martin Beet writes:
> I'm in the process of writing (yet) an(other) introduction to XML and
> I'm currently plodding through the standard.
>
> The only purpose of the CDATA section (CDSect) I can think of is for
> showing code examples. Am I missing something?
That's the general idea, but it's a little narrow. Here are a few
uses of CDATA marked sections, off the top of my head:
- source code
- excerpts from system log files
- user sessions with a shell (like bash or command.com)
- sample XML markup
- ASCII art
- mathematical text and other special notations (such as embedded TeX)
Here's a non-source-code example:
<caution>
<para>If the teletype machine displays the following text, please
leave the building as quickly as possible:</para>
<output><![CDATA
------------------------------------------------------------------------
Earthquake Warning
------------------------------------------------------------------------
]]></output>
</caution>
Good luck with the introduction,
David
--
David Megginson ak117 at freenet.carleton.ca
Microstar Software Ltd. dmeggins at microstar.com
http://home.sprynet.com/sprynet/dmeggins/
xml-dev: A list for W3C XML Developers
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To unsubscribe, send to majordomo at ic.ac.uk the following message;
unsubscribe xml-dev
List coordinator, Henry Rzepa (rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list