{
  "attachments": [],
  "comments_archived": true,
  "date": "2003-10-02T16:26:02.000Z",
  "layout": "post",
  "title": "RSS 2.0 namespace versus RSS-Data, Part 2: First impressions",
  "wordpress_id": 489,
  "wordpress_slug": "rss-data-versus-namespace-2",
  "wordpress_url": "http://www.decafbad.com/blog/?p=489",
  "year": "2003",
  "month": "10",
  "day": "02",
  "isDir": false,
  "slug": "rss-data-versus-namespace-2",
  "type": "entry",
  "postName": "2003-10-02-rss-data-versus-namespace-2",
  "html": "<p>\nOkay, I got\n<a href=\"http://www.decafbad.com/blog/tech/rss_data_versus_namespace.html\">the example data</a> out there.\nHere's what's first on my mind about it:\n</p>\n<ol>\n<li>\n<p>\nMan, that RSS-Data is one verbose piece of XML.  The Amazon-specific\nnamespace version looks much more compact and readable; I'd rather\n<a href=\"http://backend.userland.com/davesRss2PoliticalFaq\">View Source</a>\non that one.\n</p>\n</li>\n<li>\n<p>\nPython comes out of the box with\n<a href=\"http://www.python.org/doc/current/lib/module-xmlrpclib.html\">xmlrpclib</a>,\nand other languages have XML-RPC facilities available as well.  I can't imagine\nit'd be too hard to get a hold of the core of it and employ it in\nunmarshalling the RSS-Data straight into idiomatic Python structures.\nOn the other hand, I'll need to write my own handlers for the Amazon XML\nusing the XML parser modules that come with Python.\n</p>\n</li>\n<li>\n<p>\nWith its clean, almost self-documenting structure, the Amazon XML is easily\nhandled with XPath and XSL.  If I had a pile of ProductInfo elements\nin a document, I could yank out all their images with something like:\n<code>//az:ProductInfo/az:Details/az:ImageUrlSmall</code>\n</p>\n<p>\nUsing the RSS-Data\nexample, it'd probably be something more like:\n<code>//sdl:data/sdl:struct/sdl:member/sdl:name[@text='ImageUrlSmall']/../sdl:value</code>,\nand that's not considering if I have mixed kinds of RSS-Data schema represented in the\nfeed.\n</p>\n<p>\nI suppose I could help this out by surrounding the struct with another\nstruct, containing one member named 'AzProductInfo', making the path something\nlike so:\n<code>//sdl:data/sdl:struct/sdl:member/sdl:name[@text='AzProductInfo']\n\n\n</code></p><p><code>/../sdl:value/sdl:struct/sdl:member/sdl:name[@text='ImageUrlSmall']/../sdl:value</code>.</p>\n<p></p>\n</li>\n</ol>\n\n<p>\nAnd these are the conclusions I'm jumping to at the moment, before experimenting:\n</p>\n\n<ol>\n<li>\nRSS-Data's convenience to script authors is at odds with the RSS 2.0\nspirit of View Source.\n</li>\n<li>\nProducing and consuming RSS-Data could be easier than handling\npurpose-specific XML schema in scripts.\n</li>\n<li>\nSince RSS-Data doesn't follow in the spirit of XML specs and schema,\nusing formal XML tools to handle this stuff will give you\nnothing but headaches.  (Then again, it seems like some of the\nstuff that's fully in the spirit of XML yields headaches just\nthe same.)\n</li>\n<li>\nRSS-Data might catch on and spread nonetheless, because lots\nof people don't read XML, don't use formal XML tools, and just\nwrite scripts to get their jobs done.\n</li>\n</ol>\n\n\n<!--more-->\n\n\n<p>shortname=rss_data_versus_namespace_2</p>\n",
  "body": "<p>\r\nOkay, I got\r\n<a href=\"http://www.decafbad.com/blog/tech/rss_data_versus_namespace.html\">the example data</a> out there.\r\nHere's what's first on my mind about it:\r\n</p>\r\n<ol>\r\n<li>\r\n<p>\r\nMan, that RSS-Data is one verbose piece of XML.  The Amazon-specific\r\nnamespace version looks much more compact and readable; I'd rather\r\n<a href=\"http://backend.userland.com/davesRss2PoliticalFaq\">View Source</a>\r\non that one.\r\n</p>\r\n</li>\r\n<li>\r\n<p>\r\nPython comes out of the box with\r\n<a href=\"http://www.python.org/doc/current/lib/module-xmlrpclib.html\">xmlrpclib</a>,\r\nand other languages have XML-RPC facilities available as well.  I can't imagine\r\nit'd be too hard to get a hold of the core of it and employ it in\r\nunmarshalling the RSS-Data straight into idiomatic Python structures.\r\nOn the other hand, I'll need to write my own handlers for the Amazon XML\r\nusing the XML parser modules that come with Python.\r\n</p>\r\n</li>\r\n<li>\r\n<p>\r\nWith its clean, almost self-documenting structure, the Amazon XML is easily\r\nhandled with XPath and XSL.  If I had a pile of ProductInfo elements\r\nin a document, I could yank out all their images with something like:\r\n<code>//az:ProductInfo/az:Details/az:ImageUrlSmall</code>\r\n</p>\r\n<p>\r\nUsing the RSS-Data\r\nexample, it'd probably be something more like:\r\n<code>//sdl:data/sdl:struct/sdl:member/sdl:name[@text='ImageUrlSmall']/../sdl:value</code>,\r\nand that's not considering if I have mixed kinds of RSS-Data schema represented in the\r\nfeed.\r\n</p>\r\n<p>\r\nI suppose I could help this out by surrounding the struct with another\r\nstruct, containing one member named 'AzProductInfo', making the path something\r\nlike so:\r\n<code>//sdl:data/sdl:struct/sdl:member/sdl:name[@text='AzProductInfo']<br />\r\n/../sdl:value/sdl:struct/sdl:member/sdl:name[@text='ImageUrlSmall']/../sdl:value</code>.\r\n</p>\r\n</li>\r\n</ol>\r\n\r\n<p>\r\nAnd these are the conclusions I'm jumping to at the moment, before experimenting:\r\n</p>\r\n\r\n<ol>\r\n<li>\r\nRSS-Data's convenience to script authors is at odds with the RSS 2.0\r\nspirit of View Source.\r\n</li>\r\n<li>\r\nProducing and consuming RSS-Data could be easier than handling\r\npurpose-specific XML schema in scripts.\r\n</li>\r\n<li>\r\nSince RSS-Data doesn't follow in the spirit of XML specs and schema,\r\nusing formal XML tools to handle this stuff will give you\r\nnothing but headaches.  (Then again, it seems like some of the\r\nstuff that's fully in the spirit of XML yields headaches just\r\nthe same.)\r\n</li>\r\n<li>\r\nRSS-Data might catch on and spread nonetheless, because lots\r\nof people don't read XML, don't use formal XML tools, and just\r\nwrite scripts to get their jobs done.\r\n</li>\r\n</ol>\r\n<!--more-->\r\nshortname=rss_data_versus_namespace_2\r\n",
  "parentPath": "./content/posts/archives/2003",
  "path": "2003/10/02/rss-data-versus-namespace-2",
  "summary": "Okay, I got\nthe example data out there.\nHere's what's first on my mind about it:\n\n\n\n\nMan, that RSS-Data is one verbose piece of XML.  The Amazon-specific\nnamespace version looks much more compact and readable; I'd rather\nView Source\non that one.\n\n\n\n\nPython comes out of the box with\nxmlrpclib,\nand other languages have XML-RPC facilities available as well.  I can't imagine\nit'd be too hard to get a hold of the core of it and employ it in\nunmarshalling the RSS-Data straight into idiomatic Python structures.\nOn the other hand, I'll need to write my own handlers for the Amazon XML\nusing the XML parser modules that come with Python.\n\n\n\n\nWith its clean, almost self-documenting structure, the Amazon XML is easily\nhandled with XPath and XSL.  If I had a pile of ProductInfo elements\nin a document, I could yank out all their images with something like:\n//az:ProductInfo/az:Details/az:ImageUrlSmall\n\n\nUsing the RSS-Data\nexample, it'd probably be something more like:\n//sdl:data/sdl:struct/sdl:member/sdl:name[@text='ImageUrlSmall']/../sdl:value,\nand that's not considering if I have mixed kinds of RSS-Data schema represented in the\nfeed.\n\n\nI suppose I could help this out by surrounding the struct with another\nstruct, containing one member named 'AzProductInfo', making the path something\nlike so:\n//sdl:data/sdl:struct/sdl:member/sdl:name[@text='AzProductInfo']\n\n\n/../sdl:value/sdl:struct/sdl:member/sdl:name[@text='ImageUrlSmall']/../sdl:value.\n\n\n\n\n\nAnd these are the conclusions I'm jumping to at the moment, before experimenting:\n\n\n\n\nRSS-Data's convenience to script authors is at odds with the RSS 2.0\nspirit of View Source.\n\n\nProducing and consuming RSS-Data could be easier than handling\npurpose-specific XML schema in scripts.\n\n\nSince RSS-Data doesn't follow in the spirit of XML specs and schema,\nusing formal XML tools to handle this stuff will give you\nnothing but headaches.  (Then again, it seems like some of the\nstuff that's fully in the spirit of XML yields headaches just\nthe same.)\n\n\nRSS-Data might catch on and spread nonetheless, because lots\nof people don't read XML, don't use formal XML tools, and just\nwrite scripts to get their jobs done.",
  "needsBuild": true,
  "prevPostPath": "2003/10/02/rss-data-versus-namespace",
  "prevPostTitle": "An example of an RSS 2.0 namespace versus RSS-Data usage",
  "nextPostPath": "2003/10/03/rss-data-versus-namespace-3",
  "nextPostTitle": "RSS 2.0 namespace versus RSS-Data, Part 3: Electric Boogalee"
}