You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Al...@mail.tmmna.com on 2001/06/12 20:06:41 UTC

Whitespace in the CDATA Section

It is my understanding that the CDATA section goes untouched by the parser.
If this is so why then do all my CRLF,  within a cdata, get replaced with
just a LF?  Is there a way where the CRLF can be preserved?

Thank you,
Allison


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: Whitespace in the CDATA Section

Posted by Andy Clark <an...@apache.org>.
Allison_Santoro@mail.tmmna.com wrote:
> It is my understanding that the CDATA section goes untouched by the parser.

This is incorrect. Data within a CDATA section does *not* go
untouched. It's just that normal markup characters such as
'<' and '&' are treated as characters within a CDATA section.

> If this is so why then do all my CRLF,  within a cdata, get replaced with
> just a LF?  Is there a way where the CRLF can be preserved?

Newline normalization is mandated by the XML specification.
So a compliant XML parser must do the newline normalization.

-- 
Andy Clark * IBM, TRL - Japan * andyc@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org