Re: DOM Level 3+normalizeDocument

Joseph Kesselman scripsit:

> <![CDATA[The trick is to divide the token so it isn't entirely within a 
> single CDATA block. One solution would be ]]]]><![CDATA[>, where we've 
> split it right before the > character. Obviously you could divide the two 
> ]'s instead. Or drop out of CDATA markup entirely for a moment, like so: 
> ]]>]]> or ]]&gt;<![CDATA[. Anything which correctly represents the text 
> and is legal XML is an acceptable solution. Take your pick.]]>

Almost.  ]]>]]> will not work, because ]]> is illegal in ordinary character
content; you must write ]]&gt;, which indeed is why the gt entity exists.

-- 
There is / One art                      John Cowan <jcowan@reutershealth.com>
No more / No less                       http://www.reutershealth.com
To do / All things                      http://www.ccil.org/~cowan
With art- / Lessness                     -- Piet Hein

Received on Monday, 23 September 2002 12:02:08 UTC