|
|
Re: ': msg#00023
java.enhydra.xmlc
Actually, double quotes are at issue they are used to enclose attribute
values. I never said that double quotes shouldn't be escaped; they
absolutely should! Single quotes don't have the same issues that
double quotes do. How would leaving single quotes alone but
escaping double quotes break anything?
Jake
At 06:04 PM 4/7/2003 +0200, you wrote:
On Monday 07 April 2003 17:41,
Jacob Kjome wrote:
> I'm actually not sure why XMLC would bother changing single quotes
to
> ' since single quotes aren't special characters in
XML?
Single (and double) quotes aren't special characters per se, but they can
cause problems inside of attribute values if they are not escaped. For
example, consider setting "someAttribute" dynamically to
'quote: "here we
go"'. If quotes were not escaped, you'd get markup along the lines
of
<sometag someAttribute="quote: "here we go""
/>
which is definitely *not* valid. That's why XMLC escapes quotes by
default.
--
Richard Kunze
[ t]ivano Software, Bahnhofstr. 18, 63263 Neu-Isenburg
Tel.: +49 6102 80 99 07 - 0, Fax.: +49 6102 80 99 07 - 1
http://www.tivano.de,
kunze@xxxxxxxxx
| |