It’s just data

Sad to see Don cave

Don Box's RSS 2.0 feed now supports <content:encoded>.  I was kinda hoping that it would support <xhtml:body> instead (literally instead of encoded).  I'm sure that NewsGator would have adapted.  Needless to say, I would have too.

See http://www.gotdotnet.com/team/dbox/default.aspx#nn2003-03-29T06:15:00Z

Are you going to make the change too?

Posted by Don Box at

Is there an example anywhere of a feed using <xhtml:body>?

Posted by Greg Reinacker at

Ok, being unable to find any example of this in the wild, I created an example.  Does this look like what you guys are thinking?  Same namespace?  We're about 2 days past a NewsGator code freeze, but this is such a trivial change, I'm thinking about checking it in for Monday's 1.1 release.

And re-running through our entire test suite...bummer.

Posted by Greg Reinacker at

Greg, this does look like what I was thinking about. I've updated the stylesheet that emits the RSS 2.0 to match your example ( modulo where the ns decl for xhtml appears ). It'll get propped sometime on Monday I would guess. Here's hoping you do add support to the 1.1 release.

Good luck with the test suite...

Posted by Gudge at

This is close. Note that the child elements of body (e.g., div, p) also need to be affiliated with the xhtml namespace.

Hopefully Gudge will make the change to everyone's blog at GDN at once (perhaps by having them all share a common code/xslt base for their RSS feeds?).

Posted by Don Box at

Looks like GDN is "upgrading" at the moment.  Once I see it in the wild, I'll update my 2.0 feed.

Posted by Sam Ruby at

Sam, this is great.

I just talked to Gudge. He'll prop the changes for at least his and my feeds - unfortunately we probably won't see it until Monday.

Each item will look just like Greg's example, except that all children of xhtml:body will be qualified by the http://www.w3.org/1999/xhtml namespace (per XHTML 1.0).

I'll coordinate with ChrisAn to patch blogx this weekend as well.

Posted by Don Box at

Ok, cool.  My code will work either way (html elements either in or not in xhtml namespace), so I think we're good to go.  Barring any critical problems between now and Monday, this should go into NG 1.1.

If anyone gets a sample that looks like what you're planning to go with, can you post it somewhere so I can do a final test against it before shipping?  If I could see it by Saturday evening, it would help immensely... :-)

Posted by Greg Reinacker at

I updated the sample to add the xhtml namespace to the body's child elements.

Posted by Greg Reinacker at

Your updated example looks perfect.

I'm assuming that NG/1.1 doesn't care about which prefix (if any) I use.

Posted by Don Box at

That's correct - NG doesn't care what prefix you use.

The preferred prefix, though,  is "buynewsgator".

:-)

Posted by Greg Reinacker at

Better than average results for adding something unexpected to RSS, too: Radio and Syndirella refuse to believe that they can subscribe to the test feed, but the other six aggregators I tried (Aggie, AmphetaDesk, NewzCrawler, Effbot, Wildgrape NewsDesk, and Awasu) all subscribed and saw the title/description/link without any problem.

Posted by Phil Ringnalda at

Radio and Syndirella may be rejecting Greg's example because the top-level channel is missing the link and description child elements.

RSS/2.0 lists these elements as required.

Posted by Don Box at

D'oh. Radio even said that it was missing the link element, but I just assumed it meant an item link and was confused about what the xhtml:body element really was. Bad me.

Posted by Phil Ringnalda at

I updated the example to include the link and description elements.

I also added some markup inside the body element, to make sure we all agree what this should look like...I actually had to fix something to make this work, so I thought I'd make sure you guys agree what it should look like.

Inside the <xhtml:body> element, the text now says:

content here demonstrating use of &lt;xhtml:body&gt; element.

Which of course would be rendered in the readers as

content here demonstrating use of <xhtml:body> element.

Looks right to me...is this what you guys would expect as well inside the XML?

Posted by Greg Reinacker at

xhtml in rss 2.0

Don uncaves.  ;-) Accordingly, I've converted my rss 2.0 feed from <content:encoded> to the to the more bandwidth and xpath friendly <xhtml:body>.  It looks like gotdotnet and blogx users will soon follow. Hopefully  the ...

Pingback from Sam Ruby: xhtml in rss 2.0

at

Cool, Sam, your new feeds are working well with NG 1.1.

One gotcha for people parsing feeds like this - make sure you set your parser to preserve whitespace, or you may end up with an inaccurate rendering.

Posted by Greg Reinacker at

xhtml in rss 2.0

I've converted my rss 2.0 feed from <content:encoded> to the more bandwidth and xpath friendly <xhtml:body>. It looks like gotdotnet and blogx users will soon follow. Hopefully the owners of the wellformedweb and w3future weblogs will...

Excerpt from Sjoerd Visscher's weblog at

RSS and the RESTian Dilema

There we where thinking we had some agreement on the RSS format and had achieved some convergence and stability at the 2.0 level, then this happens! [more]

Trackback from TheArchitect.co.uk - Jorgen Thelin's weblog

at

Greg,

Your new example looks perfect. Feel free to either (a) make the top-level channel elements point to my site or (b) dummy-up the item elements. Right now, you have a "real" item from my blog but totally fictitious channel title/link/description.

I'd hate for anyone to get confused.

Posted by Don Box at

Yeah, yours was the closest bit of RSS I had handy when I was hacking that up. :-)  I fixed it so as not to confuse.

By the way, Don, your latest post on your own weblog about this stuff looks good on your site, but the encoded text in the RSS file is pretty broken - the <'s and >'s aren't encoded, so it won't render as intended.

Posted by Greg Reinacker at

Yet another reason to move to <xhtml;body>!

It looks like a nested escaping problem - I'll make sure it works right by Monday.

Posted by Don Box at

Interesting stuff.
Has anyone actually written down the desired or even 'correct' interpretation of an xhtml:body element by an RSS agent? There are quite a few associated issues - for example, can an item have multiple xhtml:body elements? what if there is also a content:encoded element - should a newsreader display one in preference or both?

Posted by Danny at

My interpretation, as implemented in NewsGator 1.1, is that there will be a single xhtml:body element, just like there is a single description element.  I'm not sure what the intention would be behind multiple elements, but NewsGator would pick the first one.

And it will display xhtml:body if present, otherwise content:encoded if present, otherwise description.

Posted by Greg Reinacker at

XHTML in rss 2.0

Sam Ruby: xhtml in rss 2.0 I've converted my rss 2.0 feed from &lt;content:encoded&gt; to the to the more bandwidth... [more]

Trackback from Jim Mangan's Weblog

at

Tag du jour: <xhtml:body>. Now what?

First Don Box switches his RSS feed to support <content:encoded> (which is what I did from early on, BTW). Then Sam Ruby gently chides him for that, proposing the use of <xhtml:body> instead, a form which I hadn't read about previously...... [more]

Trackback from Solipsism Gradient

at

It's Fun to Watch Evolution

It's just amazing how fast things move right now. Over the last two or three weeks: I (and others, I imagine) asked Don to add the content of his blog entries (rather than just titles) to his RSS feed. First Gudge then Don did so, but...

Excerpt from CraigBlog at

Does anyone know where to find some C# source that converts HTML to XHTML?

I've posted some additional comments on what it'll take to get this widely adopted.

Posted by Mike Sax at

Does anyone know where to find some C# source that converts HTML to XHTML?

http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=B90FDDCE-E60D-43F8-A5C4-C3BD760564BC

Posted by Dare Obasanjo at

Hrm. Two Mike Sax posts today that I'd like to comment on. Too bad I'm not willing to abuse Sam as a comment host for other people's weblogs. Any more than I already do. Mike: care to join the community? If you don't want to write your own comment solution, I know where to get code in PHP, Perl, and Python (and that's a hint about one comment).

Posted by Phil Ringnalda at

Markup at the crossroads

It may not be now or never, but it's certainly now or later...

Excerpt from Don Box's Spoutlet at

Add your comment