Loading ...
Sorry, an error occurred while loading the content.
 

writeRssFile callbacks

Expand Messages
  • Eric Soroos
    So I m thinking that since there are all sorts of cool callbacks in the radio process, it shouldn t be too hard to knock out the review meta data spec
    Message 1 of 2 , Nov 5, 2003
      So I'm thinking that since there are all sorts of cool callbacks in the
      radio process, it shouldn't be too hard to knock out the review meta
      data spec (http://www.pmbrowser.info/wiki.pl?RVW) as a plugin.

      But I've run into the 4th or 5th representation of xml in radio in the
      callbacks for writeRssFile. (see
      http://backend.userland.com/stories/storyReader$210 for the specs)

      In short, you are allowed attributes and a value. You are not allowed
      nested XML.

      e.g. <foo bar="baz">bonk</foo> works, but

      <foo>
      <bar>baz</bar>
      </foo>

      can't be made to work. The xml can't even be included as the /value
      element, since entities are encoded when they are added to the string.

      Which is a real bummer, since the spec has structures like:

      <rvw:item>
      <rvw:link>http://www.amazon.com/exec/obidos/ASIN/0156027321/</rvw:link>
      <dc:identifier>ASIN:0156027321</dc:identifier>
      <dc:type>Text</dc:type>
      <dc:title>Life of Pi</dc:title>
      <dc:creator>Yann Martel</dc:creator>
      <dc:publisher>Harvest Books</dc:publisher>
      <dc:date>2003-05</dc:date>
      <ent:cloud ent:href="http://www.pmbrowser.info/rvw/">
      <ent:topic ent:id="paperback" ent:classification="book"
      ent:href="http://www.pmbrowser.info/rvw/types.xtm#book">paperback</
      ent:topic>
      </ent:cloud>
      <rvw:rating>
      <rvw:minimum>0</rvw:minimum>
      <rvw:maximum>10</rvw:maximum>
      <rvw:value>7</rvw:value>
      </rvw:rating>
      </rvw:item>

      That seems like a straight forward application of the basic xml verbs:

      adrItem = xml.addTable(adrTable,"rvw.item");
      xml.addValue(adrItem, "rvw.link", link);
      ...

      What's unclear to me is why we have an incomplete representation of xml
      for this fragment when there are at least two complete ones at our
      disposal.

      eric
    • Matt Mower
      Hi Eric, I think I must have solved this problem when I implemented the K- Collector client for Radio. One of it s jobs is to put ENT metadata into the Radio
      Message 2 of 2 , Nov 6, 2003
        Hi Eric,

        I think I must have solved this problem when I implemented the K-
        Collector client for Radio. One of it's jobs is to put ENT metadata
        into the Radio RSS feed.

        From memory, what I did was to write a writeRssFile callback which
        is, effective, a copy of the existing writeRssFile function with a
        fix to allow properly nested XML being output.

        I'm out for the rest of the day but will post further when I get a
        chance.

        Regards,

        Matt

        p.s. Thanks to JY for alerting me to this message.
      Your message has been successfully submitted and would be delivered to recipients shortly.