开发者

is extra whitespace allowed in RSS feeds

For years I thought "extra" whitespace in an RSS feed is allowed. The feeds validate fine on W3C but one client is complaining about these whitespaces. I'll probably conform to their system for expediency, but I'm wondering who's in the right here.

Sample of my feed:

<channel>
<title><![CDATA[Title]]></title>
<description>![CDATA[Description]]></description>

The way they need it:

<channel><title><![CDATA[Title]]></title><description>![CDATA[Description]]></d开发者_如何学Pythonescription>

is their system fragile or is my system wrong?

Thanks


It's not that anyone is wrong per se, but that they've violated the robustness principle in writing their code too rigidly.

EDIT:

I take this back. They're wrong as hell. XML allows that spacing, and since they don't accept it they don't accept XML, and hence RSS.


I thought it did not matter either.

The spec seems to suggest that pretty printing is allowed. Although it does state that all characters will be parsed.

http://www.w3.org/TR/xml/#sec-white-space

Which explains this... which says some parsers treat white space outside of elements differently.

http://msdn.microsoft.com/en-us/library/ms256097.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜