Simon Fell > Its just code > Got Namespaces ?

Saturday, September 28, 2002

An investigation into the current state of namespace awareness in RSS aggregators.

Tests
I defined a set of test RSS feeds, both RSS 1.0 and RSS 2.0, these use a mix of modules, differing namespace usage styles, and clashing localnames, this should give a good indication as to how well current aggregators cope with RSS 1.0 & 2.0's ability to be extended with namespaced modules.
  1. rss1.0withModules.xml
  2. rss1.0withModulesNoDefNS.xml
  3. rss1.0withModulesNoDefNSLocalNameClash.xml
  4. rss2.0noNSwithModules.xml
  5. rss2.0noNSwithModulesLocalNameClash.xml
  6. rss2.0NSwithModules.xml
  7. rss2.0NSwithModulesNoDefNS.xml
  8. rss2.0NSwithModulesNoDefNSLocalNameClash.xml

My own personal suspicion before running any tests is that the aggregators that haven't needed any changes to work with RSS2.0 aren't handling namespaces properly, and the localName clash tests will trip them up.

Results
Aggie RC4 on XP

  1. Fails to show entries
  2. Fails to show entries
  3. Shows entries from wrong namespace (shows the last szf:description item, probably just looking at the last element it finds with a description localname)
  4. Entry appears
  5. Shows entries from wrong namespace (shows the last szf:description item, probably just looking at the last element it finds with a description localname)
  6. Entry appears
  7. Entry appears
  8. Shows entries from wrong namespace (shows the last szf:description item, probably just looking at the last element it finds with a description localname)

It appears that Aggie doesn't really like RSS 1.0, i don't understand yet why test 6&7 (rss2 with NS) work, yet tests 1&2 (rss1) fail. It looks like aggie is ingoring element namespaces, and just looking for localname matches.

Aggie (built from CVS 9/28) on XP

  1. Entry appears
  2. Entry appears
  3. Entry appears
  4. Entry appears
  5. Entry appears
  6. Entry appears
  7. Entry appears
  8. Entry appears
Woo Hoo, 100% pass.

Radio 8.0.5 on XP with radio.root updated 9/28
  1. Entry appears
  2. Entry appears
  3. shows entry from wrong namespace, appears to show the first element with a localname of description
  4. Entry appears
  5. shows entry from wrong namespace, appears to show the first element with a localname of description
  6. Entry appears
  7. Entry appears
  8. shows entry from wrong namespace, appears to show the first element with a localname of description
Radio appears to look at the first element it finds with the localname of description.

NetNewsWire Lite 1.0 on Mac OS 10.2.1
  1. Entry appears
  2. Entry appears
  3. Entry appears
  4. Entry appears
  5. Entry appears
  6. Entry appears
  7. Can't display this subscription because the RSS feed could not be found.
  8. Can't display this subscription because the RSS feed could not be found.
don't know why test 6 works when 7 doesn't is a little strange.

Amphetadesk 0.93 on XP
  1. Entry appears
  2. won't subscribe to channel. "AmphetaDesk could not determine the format of http://www.pocketsoap.com/rssTests/rss1.0withModulesNoDefNS.xml."
  3. won't subscribe to channel. "AmphetaDesk could not determine the format of http://www.pocketsoap.com/rssTests/ rss1.0withModulesNoDefNSLocalNameClash.xml."
  4. Entry appears
  5. Entry appears
  6. Entry appears
  7. won't subscribe to channel. "AmphetaDesk could not determine the format of http://www.pocketsoap.com/rssTests/rss2.0NSwithModulesNoDefNS.xml."
  8. won't subscribe to channel. "AmphetaDesk could not determine the format of http://www.pocketsoap.com/rssTests/ rss2.0NSwithModulesNoDefNSLocalNameClash.xml."

It appears that Amphetadesk incorrectly keys of the default namespace of the root element to determine the RSS version. Update, Morbus says Amphetadesk just looks for elements in the default namespace.

Conclusions
If you're writing RSS aggregator apps that support RSS 1.0 or RSS 2.0, run, don't walk, and go read the XML Namespaces rec.