[rfc-i] CDATA, was: Fwd: New Version Notification for draft-hoffman-xml2rfc-06.txt

Paul Hoffman paul.hoffman at vpnc.org
Tue Apr 29 08:48:19 PDT 2014


On Apr 29, 2014, at 1:11 AM, Julian Reschke <julian.reschke at gmx.de> wrote:

> People who use CDATA frequently think "anything can go in here", and it's good to warn that this is not the case.

We don't really know what they think. :-)

>> The solution is to break the string up, such as using multiple CDATA
>> blocks, as in this example:
>>     ...]]]]><![CDATA[>...
> 
> The IMHO better solution is not to use CDATA at all :-)

The alternative, adding escaping, has its own issues. First, it is incompatible with copying-and-pasting from a different document or from the CLI. Second, you have to check very carefully the output of the escaping, and missing those causes errors in the document; see the last draft for an example of this.

Proposed wording for the next draft:

Using CDATA is not a panacea, but it does help prevent having to use escapes in places where using using escapes can cause other problems, such as difficulty of inclusion from other documents.

--Paul Hoffman


More information about the rfc-interest mailing list