Re: speaking of XSLT...

From: Eric Armstrong (
Date: Tue Feb 06 2001 - 14:38:50 PST

Eugene Eric Kim wrote:
> Well, the attribute content is specified as CDATA (not that xt pays
> attention to the DTD anyway), so it shouldn't be looking for entity
> references in attributes....
CDATA is declared in the data, not in the DTD.
Similar terms have slightly different meanings between the
DTD and the XML itself, so it can be pretty confusing.

So a DTD as PCDATA (parsed character data). While the
XML file has the capability of specifying CDATA using
the appropriate hieroglyphics. Something like

The content of the CDATA section goes into a text field.
But note that specifying "cdata" in the DTD could *never*
be sufficient -- because the parser would have no way of
knowing when the end of the CDATA occurred.

The CDATA section is therefore defined in the XML, if it
exists at all, and the ]]> sequence demarcates it.

Basically, anywhere text exists in your xml element-structure,
you should be able to place a CDATA section. You either
have to do that, or use escapes (&amp;) to avoid parsing
of characters that would otherwise be construed as part
of the markup.

But then there are attributes...
As of XML 1.0, I don't believe it was possible to put CDATA
into an attribute, because attributes were not allowed to
have structure. (I think that's right, but someone may be
able to correct me on that.)

A newer version of XML (in progress? done?), I believe,
allowed attributes to contain an arbitrarily deep
structure. Again, this factoid is only as certain as the
tenuous memory thread that leads to it. But if my
recall should happen to be accurate, perhaps CDATA
sections become possible in XML attributes at the same

Then there is RSL. We should probably be taking a much
deeper look at that little jewel. One of its features
is attribute/element symettry.

This archive was generated by hypermail 2.0.0 : Tue Aug 21 2001 - 17:58:00 PDT