DTD design advice: evaluated markup in CDATA sections?

A

Arvin Portlock

I'm designing a small XML DTD to encode some help documentation.
The documentation contains a large number of examples of XML
markup. Naturally CDATA was my first thought, but ideally I would
like to render certain parts of the markup in bold so that it
stands out. I can't think of any way to do this with CDATA:

<![CDATA[<author>
<b><part type="last">Smith</part></b>
<part type="first">John</part></author>]]>

<b> will not be evaluated any differently than the other markup.
So I'm pretty sure CDATA is out. I imagine somebody must have
dealt with this before. What sorts of things do people recommend?
My feeling is that I will have to rely on lots and lots of
&lt;/&gt; entities, but I don't relish the thought. But that
seems preferable to some weird TEI-style <tag> markup:

<tag name="part">type="last"</tag>

Arvin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,007
Messages
2,570,267
Members
46,866
Latest member
Aletlirm

Latest Threads

Top