[jdom-interest] Form Feed character in CDATA section

Elliotte Rusty Harold elharo at metalab.unc.edu
Thu Feb 26 18:20:07 PST 2004


At 3:36 PM -0800 2/26/04, Dennis Sosnoski wrote:
>Elliotte Rusty Harold wrote:
>
>>This is completely illegal in both XML 1.0 and 1.1. The formfeed 
>>character cannot appear in text content in 1.0 and even in 1.1 it 
>>can't appear in a CDATA section. The problem is that your code is 
>>trying to create malformed XML. The probolem is not in JDOM.
>>
>Can you give me a reference for the restriction that says formfeed 
>can't appear in a CDATA section in 1.1? The CDATA production says:
>

Form feeds can't appear anywhere, not just in CDATA. They can be 
embedded in XML 1.1 only with numeric character references. However 
real form feeds are still illegal. Since numeric character references 
can't appear in CDATA sections, it's impossible to place a form feed 
in a CDATA section.

>Incidentally, do you know the reason why they decided to include the 
>control character range as legal in 1.1? Seems like it's going to 
>create more problems than it solves.

Yep. I argued against this.
-- 

   Elliotte Rusty Harold
   elharo at metalab.unc.edu
   Effective XML (Addison-Wesley, 2003)
   http://www.cafeconleche.org/books/effectivexml
   http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA



More information about the jdom-interest mailing list