In Section 3.1.1.1. of RFC 4287,
If the value is "text", the content of the Text construct MUST NOT
contain child elements. Such text is intended to be presented to
humans in a readable fashion. Thus, Atom Processors MAY collapse
white space (including line breaks) and display the text using
typographic techniques such as justification and proportional fonts.
However, white space in some text contents cannot be collapsed. Otherwise, the
contents will be broken.
Since xml:space is not defined in RFC 4287 (although it has been defined in the
XML 1.0 Specification), it seems not valid to use it in an Atom feed (Am I
correct?). The current method to stop the white space being collapsed is to use
the <pre> of HTML/XHTML.
<atom:content type="html"><![CDATA[
<pre>
123
White space here should be preserved
456
</pre>
]]></atom:content>
My question is, can xml:space="preserve" be used? If yes, can it be added into
RFC 4287 as if xml:base and xml:lang?
<atom:content type="text" xml:space="preserve">
123
White space here should be preserved
456
</atom:content>
Thanks,
Franklin Tse