At 10:26 AM 02/07/2001 -0800, Jerry Murray wrote:
>A business partner has requested that we wrap ALL element values as CDATA so
>they don't have to worry about special characters.
>This doesn't feel right. Any comments?
Dunno who your business partner is, but someone asked a question about this
on XML-L just the other day. See:
for the question and a couple of replies.
Bottom line was that if the content can contain special characters there
are only two choices. The long-term one is to somehow pre- or post-process
the content so that all special characters are represented as entity
references. The short-term choice, which I suggested, was to wrap all
content for the elements in question (this was a Web-based form accepting
user input) in CDATA sections, just to get past the need to do the
pre-/post-processing while in the form environment. But I added that if the
data was going to be hanging around for a while, you'd still do best to
"entitize" the special chars. at some point.
John E. Simpson | "Is it weird in here, or is it just
http://www.flixml.org | me?" -- Steven Wright
XML Q&A: www.xml.com |