473,407 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

RSS and namespaces

I've been playing with writing my own RSS reader (in Ruby -- yes, I
know there are lots out there, but it's mostly for my own experience
and amusement). I tailored it to read the XML from the BBC feeds,
but it's been happy with others as well (occasionally needing minor
tweaking because of missing elements).

For interest, though, I downloaded a 'Have Your Say' forum RSS feed,
again from the BBC, and initially all I got in the HTML conversion
was a bunch of little titles, all the same... [That similarity was
expected because they're just the title of the thread.]

When I looked in detail at the source, I saw that, first, the 'description'
element was in CDATA form, which my reader wasn't set up for. I suppose
this makes sense, because some of the descriptions included HTML tags.
(Though looking at the 'XML FAQ' I see that the contents of CDATA are
*not* supposed to be inviolate from translation into entities, so I
gather that if I was using say XSLT for the conversion it wouldn't
work right anyway.)

However, the other strangeness was that important items like the
author and creationDate were in the 'jf:' namespace ("JiveSoftware").
This meant that I had to specifically add these tags to my reader
to be able to see this data. (The <item>s didn't have any <pubDate>
element at all.)

Isn't this sort of against the intent of RSS? Is this a case of
proprietary selfishness, or is there some good reason for using
a namespace to handle important generic parts of the content?
I see that some other feeds use 'itunes:' or other spaces, but
they seem to be for more specific data and don't really impact
reading by an app that doesn't know about them.

-- Pete --

--
================================================== ==========================
The address in the header is a Spam Bucket -- don't bother replying to it...
(If you do need to email, replace the account name with my true name.)
Nov 9 '06 #1
2 1278

Pete wrote:
When I looked in detail at the source, I saw that, first, the 'description'
element was in CDATA form,
There's a famously excellent article on DiveIntoMark.com that talks
about HTML encoding in RSS and the multiplicity of RSS versioning.

Isn't this sort of against the intent of RSS?
Sort of. It's not against RSS to do this (it's just adding a new
element), but it is against RSS to drop the important and useful
element in the default namespace. The fallacy is to think that they're
the same thing, or to produce a feed with <jf:pubDatein it and think
that by doing this you're also implementing <pubDate>

Then again, there's never any shortage of Stupid in the RSS world 8-(

You might be interested to read some background on Dublin Core, in
particular the old "dumbing down" principle. DC has de-evolved a bit in
recent years but it used to have a very clear and very good strategy
for ad hoc extensions like this. You were allowed (and encouraged) to
add anything you liked, with the proviso that the qualification
mechanism (how you refine a standard general-purpose property into a
more specific one) will be unreliable for clients who don't understand
the new more-specific form. Provided that the new more-specific form
was still "meaningful" (or at least not misleading) in the general
context, then you were encouraged to add it anyway. The core element is
"creator" and refined forms might be "author", "editor" or "translator"
-- all of whom are still validly regardable as creators. Less capable
clients would only see the "dumbed-down" general form, but it's still
useful to them, for as great a value of "useful" as they're capable of
grasping.

Nov 10 '06 #2
In article <11**********************@b28g2000cwb.googlegroups .com>,
Andy Dingley <di*****@codesmiths.comwrote:
>
Pete wrote:
>When I looked in detail at the source, I saw that, first, the 'description'
element was in CDATA form,

There's a famously excellent article on DiveIntoMark.com that talks
about HTML encoding in RSS and the multiplicity of RSS versioning.
Thanks for the pointer. It's clear that there's a lot more disarray
in the field than I anticipated! (:-/)

And more specifically I see in several places that HTML within a
description is supposed to be entity-escaped. No mention of CDATA
anywhere... Eek. (And then there's the danger of arbitrary HTML...)
>
>Isn't this sort of against the intent of RSS?

Sort of. It's not against RSS to do this (it's just adding a new
element), but it is against RSS to drop the important and useful
element in the default namespace. The fallacy is to think that they're
the same thing, or to produce a feed with <jf:pubDatein it and think
that by doing this you're also implementing <pubDate>

Then again, there's never any shortage of Stupid in the RSS world 8-(
Looks like it. I'm sort of glad that I tend to write my own apps for
things like this -- and take a minimalist approach. Ignore everything
I'm not specifically interested in. I may have to keep tweaking every
time I find a new feed, though...
>
[Dublin Core snipped]
Skimmed some of the stuff on that. As you say, extending, rather than
replacing, seems the obvious way to go.

Cheers,
-- Pete --
--
================================================== ==========================
The address in the header is a Spam Bucket -- don't bother replying to it...
(If you do need to email, replace the account name with my true name.)
Nov 10 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Steven Bethard | last post by:
In the "empty classes as c structs?" thread, we've been talking in some detail about my proposed "generic objects" PEP. Based on a number of suggestions, I'm thinking more and more that instead of...
24
by: Marcin Vorbrodt | last post by:
Here is an example of my code: //Header file #include <vector> using std::vector; namespace Revelation { // class definitions, etc... // class members are of type std::vector }
2
by: Mike Morse | last post by:
What see sample that show xs:element where the xs namespace = http://www.w3.org/2001/XMLSchema However, I see another example with xsi: where xsi = http://www.w3.org/2001/XMLSchema-instance ...
3
by: Jim Heavey | last post by:
Trying to get the hang of Namespaces. I have primarly developed in VB and am transitioning to C# and the .Net Environment. I have worked a bit with Java as well in school about a year or so ago....
17
by: clintonG | last post by:
Using 2.0 with Master Pages and a GlobalBaseClass for the content pages. I understand the easy part -- the hierarchical structure of a namespace naming convention -- but the 2.0 IDE does not...
11
by: Random | last post by:
I'm confused about the proper use and usefulness of namespaces. I beleive I understand the purpose is so the developer can put classes within namespaces to essentially organize your code. And I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.