[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: cdata was: XSL and HTML

Subject: Re: cdata was: XSL and HTML
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 14 Jan 1999 17:55:44 GMT
html lost cdata section
> In a transformation how would you produce CDATA 

You can't produce `CDATA' because there is no such thing as CDATA.
CDATA is a flag to a parser to use different rules, but the parsed
result should be the same: character data.
I can write `a' or <![CDATA[a]]> anywhere in my document and I should
get the same document tree. You get ___normal___ character data inside
a CDATA marked section.

The only way to change this is, as Oren said in his reply, to change this
and make  <![CDATA no longer just a parser flag, but to really
generate a new type of node in the parsed result. (This is what happens
in the DOM).

This seems to be rather bad as far as I can see. Traditionally, if
say I had a paragraph that had a lot of < and & in the text, then I 
may chose to stick a CDATA section around the whole paragraph, or
just around the parts of the text that contain the & or <, or I might
not bother with CDATA at all, and just use &amp and &lt. As an author
I _know_ I am free to do whichever of these I want as I know that
they all produce exactly the same result, and so anyone else using the
text (eg searching in it) doesn't need to know _which_ parsing trick I
used to get the `&' into the document, only that they got there
somehow.

If you introduce a new CDATA node type just for the dubious benefit of
saying that you want some particular characters to be linearised in a
certain way, then you have lost this facility. Now if you are looking
for A&B do you look for a CDATA section containing A&B, or A followed by
a CDATA section containing &, or A followed by an amp entity?
Having the parser produce the same thing from all these things is a
_feature_ so making it distinguish them by adding new node types is a
loss of functionality. (Well it's not lost, but you have to layer
something over the new tree, removing all the spurious stuff).

David

PS
I'm replying since you prefaced your question with `Hi David.'
but I'm really scared posting about arcane SGML details on a list that I
know is being monitored by people like PP and JC. I'm really a TeX
person you know....


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.