CDATA bracket state

<x><![CDATA[ abc ]xyz]>   www]]></x>

is, I think, well formed XML, with the entire content of x being a CDATA 
section.

However after the first ] the draft tokeniser switches to CDATA bracket 
state and consumes the xyz in that state ("Anything else" production) 
which means it switches to CDATA end state and closes the CDATA section 
token after xyz not after www.

Shouldn't "Anything else" in CDATA bracket state say

Anything else
Emit a U+005D (]) character. Reprocess the current input character in 
the CDATA state.

David

Received on Sunday, 4 March 2012 11:09:42 UTC