In article <xM********************@speakeasy.net>,
Bill Kearney <wk********@hotmail.com> wrote:
% > You waffle a bit there (requires ... should), but I'm going to disagree
% > anyway. Except when used in a CDATA section, & and < must always be
% > encoded. On the other hand, > never needs to be encoded. and ' and "
% > need be encoded only in attribute values, and only when they match the
% > value's delimiter. It is legal to encode any of the five outside a CDATA
% > section, but not always required.
%
% Well, what's better, to worry about the if's and when's or to encode them
% consistently?
I guess, it depends on your goals. If you're writing what's `required',
I think it's better to be correct. If you have trouble keeping track
of when to use pre-defined entities, then you can take comfort in
the fact that it's always allowed, and not worry about when it's required.
% > My personal opinion is that you're better off using the predefined
% > entities as little as possible. It's hard to avoid using &, but
% > I would always encode your example using a CDATA section
% >
% > <![CDATA[this text has both <b>bold</b> & <i>italic</i> text]]>
%
% Sure, provided tools understand how to use CDATA properly (many don't).
Well, why use these tools? What's the point of pretending to use XML if
you're really spending your life worrying about whether your tools can
support the basic syntax? It's fair enough to say that you'd prefer to
always use the predefined entities, but lack of CDATA support doesn't
merit consideration.
--
Patrick TJ McPhee
East York Canada
pt**@interlog.com