Re: Maintaining an RSS 1.0 feed with SPARQL

Hi,

I'm using SPARQL to generate the feeds at bnode.org/blog, but I also 
needed some PHP. The Seq is one reason why SPARQL-only was not possible
with my tools back then, the required default rss namespace and 
content:encoded were other. Nevertheless, SPARQL simplified things quite
a bit for me: I'm using (RDF-described) channels as entry points. Channels
are associated with tags-to-include and tags-to-exclude, which allows me
to auto-generate a SPARQL SELECT + ORDER BY for a given channel's current
15 (properly tagged) items. This list of items is then passed to a PHP 
method that generates the Seq and the individual item nodes. I found that
straight-forward to implement. Most of the code is re-used for generating
the HTML view and the Atom feeds.

I'm not sure if a single DESCRIBE + a dedicated RSS Serializer could work,
the ordering would probably not be reliable..

Benji



On 01.07.2008 16:27:21, Karl Dubost wrote:
>
>Richard,
>
>thanks for the tips.
>
>Le 1 juil. 2008 à 13:14, Richard Newman a écrit :
>>  I'm not sure which operations you're inquiring about -- running  
>> queries against RSS 1.0 data? Generating RSS 1.0 from a relational  
>> DB using SPARQL? Generating RSS from differently shaped RDF?
>
>* A blog site with an RSS 1.0 feed.
>* A new blog post is created, a program creates an RDF item
>      <rdf:li rdf:resource="http://example.org/somewhere/foo"/>
>   and
>      <item rdf:about="http://example.org/somewhere/foo">
>         <title>Foo</title>
>         <link>http://example.org/somewhere/foo</link>
>         <description>boooo</description>
>      </item>
>* Update of the feed, removing old items and adding the new one.
>
>I usually do that with script/xml parsers or using XSLT because RSS  
>1.0 is an ordered RDF file by spec, *but* I was wondering if it was  
>possible to do with an RDF parser, and/or SPARQL.
>
>>  It's kinda depressing that this trivial thing isn't easy to do in  
>> SPARQL; the handling of sequences just isn't there. Even as a SPARQL  
>> implementor, without the opportunity to redesign RSS 1.0, I'd advise  
>> you to use XSLT or plain ol' text substitution for this kind of  
>> thing (particularly generation).
>
>Indeed.
>
>>  I hope that offered some insight!
>
>Yes a lot. Many thanks.
>
>if other people have ideas, please share.
>
>
>-- 
>Karl Dubost - W3C
>http://www.w3.org/QA/
>Be Strict To Be Cool
>
>
>
>
>
>
>

Received on Tuesday, 1 July 2008 09:01:38 UTC