Re: A7: CDATA, RCDATA, TEMP marked sections?
On Oct 9, 1:44am, Charles F. Goldfarb wrote:
> Here's how I would tell users to address these requirements using DTD-less
> Chapter 5. The CLEARDATA Tag.
> When you need to put scripts or other data in your document that isn't SGML,
> you mark it with special tags called CLEARDATA tags (CDATA for short).
> The CLEARDATA start-tag is: <![CDATA[
> The CLEARDATA end-tag is: ]]>
An elegant solution.
However, it doesn't solve the correct problem. I'm not so much talking about
the case where you just want to escape some characters, but where you also
want to label those characters. No semantic information other than "this
is clear text" can be attached to the CLEARDATA start-tag (sic). So you need
additional markup. This means that you are asking the HTML author, for
example, to use markup like
var1 = "<EM>Hello world</EM>"
My point is that that kind of markup will be non-intuitive and considered
completely unnecessary by the author.
I might also note that Appendix B of the standard (B.13.1.1, the paragraph
starting at 29) says that CDATA content is only ended by an end-tag which
matches the start-tag (or ancestor!?). So the SGML committee must have
considered that a good idea at one time. (Or the author of the appendix had an
intuitive, but incorrect, understanding of CDATA declared content.) If there
was a good reason why the committee changed its mind about that, I'd be
very interested to hear it.
Peter Sharpe, Chief Scientist, SoftQuad Inc. Tel: +1 604 585 1999 ext. 312
#108-10070 King George Highway, Surrey, B.C., CANADA V3T 2W4 Fax: 585 1926
Internet: email@example.com or firstname.lastname@example.org World Wide Web: www.sq.com