Phillip Pearson - Second p0st

tech notes and web hackery from the guy that brought you bzero, python community server, the blogging ecosystem, the new zealand coffee review and the internet topic exchange

2003-10-2

The tools will save us!

RSS-Data seems kinda weird to me. Quite a departure from RSS's ideal of being readable and easy to understand.

Here's an example of how it will look:

<rss version="2.0" xmlns:mynamespace="http://example.com/mynamespace"
    xmlns:sdl="http://example.com/rss-data">
 <channel>
  <title>Testing RSS-Data</title>
  <item>
   <title>A Sample Item</title>
   <mynamespace:mydata>
    <sdl:struct>
     <sdl:member>
      <sdl:name>lowerBound</sdl:name>
      <sdl:value><sdl:i4>18</sdl:i4></sdl:value>
     </sdl:member>
     <sdl:member>
      <sdl:name>upperBound</sdl:name>
      <sdl:value><sdl:i4>139</sdl:i4></sdl:value>
     </sdl:member>
    </sdl:struct>
   </mynamespace:mydata>
  </item>
 <channel
</rss>

How is that easier to deal with than the following?

<rss version="2.0" xmlns:mynamespace="http://example.com/mynamespace">
 <channel>
  <title>Testing RSS-Data</title>
  <item>
   <title>A Sample Item</title>
   <mynamespace:mydata>
    <mynamespace:lowerBound>18</mynamespace:lowerBound>
    <mynamespace:upperBound>139</mynamespace:upperBound>
   </mynamespace:mydata>
  </item>
 <channel>
</rss>

Or the following, which is way shorter and very readable:

<rss version="2.0" xmlns:myns="http://example.com/mynamespace">
 <channel>
  <title>Testing RSS-Data</title>
  <item>
   <title>A Sample Item</title>
   <myns:myrange myns:lowerBound="18" myns:upperBound="139"/>
  </item>
 <channel>
</rss>
... more like this: [, ]