Julian Reschke wrote:
> Julian Foad wrote:
>> As far I can tell from the XML spec, the set of allowable characters
>> is the same in each case (being the set of valid XML characters), but
>> the escaping is different in each case. Bizarrely, the third form
>> seems actually the most restrictive because I cannot see any way of
>> representing the literal sequence "]]>" within it; am I missing
>> something?
>
> No, you aren't. You simply can't have "]]>" inside a single CDATA
> section, thus you'll need multiple to properly encode it.
OK, so it can be represented, by splitting it between two adjacent CDATA
sections, even though that's not technically _within_ a CDATA section. I
hadn't thought of that solution.
> For this (and
> many other reasons), CDATA sections should be avoided; just use normal
> text content and apply the required XML escaping rules.
Thanks for the clarification and advice. So, we should represent a file path
either in a CDATA-type attribute value or as character data between start and
end tags, and there is little technical reason to prefer one over the other.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jan 15 19:02:32 2005