List Info

Thread: RSS in stanza?




RSS in <message> stanza?
country flaguser name
United States
2008-03-28 10:33:12
I couldn't (easily) find it... is there a defined namespace
and entity for 
adding RSS elements to <message> stanzas?

Thanks,
Jeff




Re: RSS in <message> stanza?
user name
2008-03-28 10:59:50
On Fri, Mar 28, 2008 at 8:33 AM, XMPP Dev <xmppmullercentral.com> wrote:
> I couldn't (easily) find it... is there a defined
namespace and entity for
>  adding RSS elements to <message> stanzas?

I don't know about RSS but there are definitely predefined
ways of
dealing with Atom over XMPP.

~ Anders

>
>  Thanks,
>  Jeff
>
>
>
>

Re: RSS in <message> stanza?
country flaguser name
United States
2008-03-28 11:05:49
XMPP Dev wrote:
> I couldn't (easily) find it... is there a defined
namespace and entity
> for adding RSS elements to <message> stanzas?

Which RSS?


Re: RSS in <message> stanza?
country flaguser name
United States
2008-03-28 11:15:40
> Which RSS?

OK. Point well taken. But I guess the answer to that
question (since I'm 
just looking for _any_ info) is "any". 

Although, I s'pose "2.0" would be a starting
point.

Thanks,
Jeff



Re: RSS in <message> stanza?
country flaguser name
United States
2008-03-28 11:14:32
> I don't know about RSS but there are definitely
predefined ways of
> dealing with Atom over XMPP.

Ah. So it's done with IQ stanzas and pubsub.

I'll explore that a little. Thanks.




Re: RSS in <message> stanza?
country flaguser name
Austria
2008-03-28 11:31:02
On Mar 28, 2008, at 17:15, XMPP Dev wrote:
>> Which RSS?
>
> OK. Point well taken. But I guess the answer to that
question (since  
> I'm just looking for _any_ info) is "any".

>
> Although, I s'pose "2.0" would be a starting
point.

As someone who once wrote an RSS parser, RSS cannot be
considered to  
be an XML format, it only has remote similarities to it
(some feeds  
more remotely and some much more remotely).

Additionally, RSS does not support namespaces, and so you
can't embed  
it directly in XMPP. However, you could escape it and
include it as a  
text blob:

<rss xmlns="...">
&lt;?xml version="1.0"?>  &lt;rss
version="2.0">  &lt;channel>   
&lt;title>Lift Off
News&lt;/title>&lt;link>http://lif
toff.msfc.nasa.gov/&lt;/link 
 >  &lt;description>Liftoff to Space
Exploration.&lt;/description>   
&lt;language>en-us&lt;/language> 
&lt;pubDate>Tue, 10 Jun 2003  
04:00:00
GMT&lt;/pubDate>&lt;lastBuildDate>Tue, 10 Jun
2003 09:41:01  
GMT&lt;/lastBuildDate>&lt;docs>ht
tp://blogs.law.harvard.edu/tech/rss&lt;/docs 
 >  &lt;generator>Weblog Editor
2.0&lt;/generator> 
&lt;managingEditor>editorexample.com 
&lt;/managingEditor>&lt;webMaster>webmasterexample.com&lt;/ 
webMaster>  &lt;ttl>5&lt;/ttl> 
&lt;item>  &lt;title>Star City&lt;/ 
title>  &lt;link>http://liftoff.msfc.nasa.gov/news/2003/news
-starcity.asp&lt;/link 
 >  &lt;description>How do Americans get ready to
work with Russians  
aboard the International Space Station? They take a crash
course in  
culture, language and protocol at Russia's Star
City.&lt;/ 
description>  &lt;pubDate>Tue, 03 Jun 2003
09:39:21 GMT&lt;/pubDate>   
&lt;guid>http://liftoff.msfc.nasa.gov/2003/06/03.html#item57
3&lt;/ 
guid>  &lt;/item>  &lt;item> 
&lt;title>Space Exploration&lt;/title>   
&lt;link>http:/
/liftoff.msfc.nasa.gov/&lt;/link> 
&lt;description>Sky  
watchers in Europe, Asia, and parts of Alaska and Canada
will  
experience a partial eclipse of the Sun on Saturday, May
31st.&lt;/ 
description>&lt;pubDate>Fri, 30 May 2003 11:06:42
GMT&lt;/ 
pubDate>&lt;guid>http://liftoff.msfc.nas
a.gov/ 
2003/05/30.html#item572&lt;/guid>  &lt;/item> 
&lt;item>   
&lt;title>The Engine That Does More&lt;/title>
 &lt;link>http://liftoff.msfc.nasa.gov/news/2003/news-V
ASIMR.asp&lt;/link 
 >       &lt;description>Before man travels to
Mars, NASA hopes to  
design new engines that will let us fly through the Solar
System more  
quickly. The proposed VASIMR engine would do
that.&lt;/description>   
&lt;pubDate>Tue, 27 May 2003 08:37:32
GMT&lt;/pubDate>  &lt;guid>
http://liftoff.msfc.nasa.gov/2003/05/27.html#item571 
&lt;/guid>  &lt;/item> 
&lt;item>&lt;title>Astronauts' Dirty  
Laundry&lt;/title>  &lt;link>http://liftoff.msfc.nasa.gov/news/2003/news-
laundry.asp&lt;/link 
 >  &lt;description>Compared to earlier
spacecraft, the International  
Space Station has many luxuries, but laundry facilities are
not one of  
them. Instead, astronauts have other
options.&lt;/description>   
&lt;pubDate>Tue, 20 May 2003 08:56:02
GMT&lt;/pubDate>  &lt;guid>
http://liftoff.msfc.nasa.gov/2003/05/20.html#item570 
&lt;/guid>  &lt;/item>&lt;/channel>
</rss>

(this is the example from wikipedia)

andy


Re: RSS in <message> stanza?
country flaguser name
United States
2008-03-28 11:38:22
XMPP Dev wrote:
>> Which RSS?
> 
> OK. Point well taken. 

I was just pulling your leg. 

> But I guess the answer to that question (since I'm
> just looking for _any_ info) is "any". 

Is there any special reason you want to use RSS instead of
Atom?

> Although, I s'pose "2.0" would be a starting
point.

It would be quite straightforward to define a pubsub payload
for RSS 2.0
feeds, although RSS 2.0 is not officially namespaced.
However, use of
the "http://backend
.userland.com/RSS2" namespace is optional so we
could
include that and hope nothing breaks.

IMHO the result would look something like this:

<message from='pubsub.example.com'
         to='aliceexample.net'>
  <event xmlns='http://jabber
.org/protocol/pubsub#event'>
    <items node='an-atom-node'>
      <item
id='70b2a83be71dfca04df91133d953fb22b41b4267'>
        <rss version="2.0" xmlns="http://bac
kend.userland.com/RSS2">
          <channel>
            <title>Liftoff News</title>
            <link>http://lif
toff.msfc.nasa.gov/</link>
            <description>Liftoff to Space
Exploration.</description>
            <language>en-us</language>
            <pubDate>Tue, 10 Jun 2003 04:00:00
GMT</pubDate>
            <lastBuildDate>Tue, 10 Jun 2003 09:41:01
GMT</lastBuildDate>
            <docs>ht
tp://blogs.law.harvard.edu/tech/rss</docs>
            <generator>Weblog Editor
2.0</generator>
            <managingEditor>editorexample.com</managingEditor>
            <webMaster>webmasterexample.com</webMaster>
            <item>
              <title>Star City</title>
              <link>
  http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp

              </link>
              <description>
                How do Americans get ready to work with
Russians
                aboard the International Space Station? They
take
                a crash course in culture, language and
protocol
                at Russia's &lt;a
                href="http://howe.iki.rssi.ru/GCTC/gctc_e.htm"&gt;
                Star City&lt;/a&gt;.
              </description>
              <pubDate>Tue, 03 Jun 2003 09:39:21
GMT</pubDate>
              <guid>
  
http://liftoff.msfc.nasa.gov/2003/06/03.html#item573
              </guid>
            </item>
          </channel>
        </rss>
      </item>
    </items>
  </event>
</message>

I haven't looked at RSS in a while so I'm not sure if we
could remove
the channel meta-data and just include the item.

Peter

-- 
Peter Saint-Andre
https://stpeter.im/

Re: RSS in <message> stanza?
country flaguser name
United States
2008-03-28 11:42:46
Andreas Monitzer wrote:
> On Mar 28, 2008, at 17:15, XMPP Dev wrote:
>>> Which RSS?
>>
>> OK. Point well taken. But I guess the answer to
that question (since
>> I'm just looking for _any_ info) is
"any". 
>>
>> Although, I s'pose "2.0" would be a
starting point.
> 
> As someone who once wrote an RSS parser, RSS cannot be
considered to be
> an XML format, it only has remote similarities to it
(some feeds more
> remotely and some much more remotely).

Which is why folks developed Atom.

> Additionally, RSS does not support namespaces, and so
you can't embed it
> directly in XMPP. 

I think that could be fudged, but I'm not sure why we'd want
to do that.

> However, you could escape it and include it as a text
> blob:

<snip/>

> (this is the example from wikipedia)

Gosh that's ugly. 

Peter

-- 
Peter Saint-Andre
https://stpeter.im/

Re: RSS in <message> stanza?
country flaguser name
United States
2008-03-28 11:56:33
"Peter Saint-Andre" <stpeterstpeter.im> wrote in message 
news:47ED2006.9050408stpeter.im...
> Andreas Monitzer wrote:

>> Additionally, RSS does not support namespaces, and
so you can't embed it
>> directly in XMPP.
>
> I think that could be fudged, but I'm not sure why we'd
want to do that.
>

I just would have figured you start from one of the inner
elements. Then, 
parsing the actual RSS doesn't need namespaces, no?

<message ...>
    <rss xmlns="...">
        <channel>
            ...
        </channel>
    </rss>
</message>

Jeff 



Re: RSS in <message> stanza?
country flaguser name
United States
2008-03-28 12:00:54
Jeff Muller wrote:
> 
> "Peter Saint-Andre" <stpeterstpeter.im> wrote in message
> news:47ED2006.9050408stpeter.im...
>> Andreas Monitzer wrote:
> 
>>> Additionally, RSS does not support namespaces,
and so you can't embed it
>>> directly in XMPP.
>>
>> I think that could be fudged, but I'm not sure why
we'd want to do that.
>>
> 
> I just would have figured you start from one of the
inner elements.
> Then, parsing the actual RSS doesn't need namespaces,
no?

Yes, but what is the namespace?

> <message ...>
>    <rss xmlns="...">
                 ^^^
I suppose it is http://backend.userl
and.com/RSS2 -- so we can use that,
even though it is not officially specified here:

http://cybe
r.law.harvard.edu/rss/rss.html

Peter

-- 
Peter Saint-Andre
https://stpeter.im/

[1-10]

about | contact  Other archives ( Real Estate discussion Medical topics )