RSS Modules: Presence

Authors

Just me, so far

Hugh Pyle, weblog

Version

Latest Version: this is it.

DRAFT (nay, "strawman") 0.1 2003-04-21 adds a little more commentary
DRAFT (nay, "strawman") 0.0 2003-04-18

Status

First draft.
First experimental implementation: http://www.cabezal.com/presence/presence.php?user=Hugh+Pyle/Groove

Rights

Copyright © 2003 by the Authors.

The copyright holders make no representation about the suitability of the specification for any purpose. It is provided "as is" without expressed or implied warranty.

Applicability

This module is intended to apply to RSS 1.0, RSS 2.0 and subsequent versions. The rdf:parseType="Literal" attribute is not required for non-RDF documents.

Description

Provides information to aggregators and others using this RSS feed regarding the online presence status of the feed's author and/or contributors.

The presence element can be a child of the channel (in which case it hints at the channel creator's presence) or of items in the channel (in which case it relates to the item creator). Multiple presence elements may be present in an RSS document. Generally the appropriate person (or other creator resource) will be identified by a <dc:creator> or <dc:contributor> on the item or channel, but there is no binding between those Dublin Core names and the name or identity of the resource described by the presence elements. For more specific naming you can use the optional <pr:name> element described below.

Of course, the status information is assumed to be valid at the time the RSS document was created, but not necessarily at any subsequent time. The <pr:presence> pr:source attribute provides the URL of an XML document describing the current online presence, which can be retrieved at any time. So, for example, news aggregators might cache the RSS forever, but refer to the presence source for updated status information at the time of display.

Note that this module provides "presence" without any reference to "identity". Typical identity systems will include presence-notification and subscription behaviour by reference. This module avoids the various difficulties inherent in describing identity and all its attributes, by proposing a simple way for an unidentified principal to query the online presence of another without directly referencing identities.

presence
Contains zero or one of each of the (status, icon, name, messageLink) elements. May have an attribute "source" which is the URL of an XML document containing <pr:presence> data.

For example,

    <pr:presence rdf:parseType="literal">
      <pr:status>Online</pr:status>
      <pr:icon>http://www.cabezal.com/presence/online.png</pr:icon>
      <pr:name>hpyle</pr:name>
      <pr:messageLink>http://www.cabezal.com/presence/im.php?id=hpyle</pr:messageLink>
    </pr:presence>

Or just a pointer to a presence source (which is sufficient, and in some implementations may be preferred to explicit inclusion of current status information):

    <pr:presence pr:source="http://www.cabezal.com/presence/presence.php?id=hpyle" />

where the XML document at the presence source contains more information:

    <?xml version="1.0" encoding="utf-8"?> 
    <pr:presence xmlns:pr="http://www.cabezal.com/ns/presence/">
      <pr:status>Online</pr:status>
      <pr:icon>http://www.cabezal.com/presence/online.png</pr:icon>
      <pr:name>hpyle</pr:name>
      <pr:messageLink>http://www.cabezal.com/presence/im.php?id=hpyle</pr:messageLink>
    </pr:presence>

status
Describes the online presence of the resource, in plain text. For example, "Online", "Offline" or "Away".

icon
Provides the URL of a graphical representation of the presence of the resource, for example an icon. No restrictions are placed on the type or size of this graphic, but client applications wishing to display the presence icon are likely to assign a very small square area (16x16 pixels, typically) and may resize the graphic to fit as they desire.

name
Provides a human-readable name for the resource (ie. the author's "screen-name" or other identifier).

messageLink
Provides the URL of a resource (web page, "mailto" link, etc) which allows you to send a message to this person.

Namespace Declarations

Model

<channel> and <item> Elements:

Example (RSS 1.0)

<?xml version="1.0" encoding="utf-8"?> 

<rdf:RDF 
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
  xmlns:pr="http://www.cabezal.com/ns/presence/"
  xmlns="http://purl.org/rss/1.0/"
> 

  <channel rdf:about="http://www.cabezal.com/blog/">
    <title>Hugh's Ramblings</title>
    <link>http://www.cabezal.com/blog/</link>
    <description>Never knowingly underestimated</description>
    <dc:language>en-us</dc:language>
    <dc:creator>hpyle</dc:creator>
    <dc:date>2003-04-18T08:27:51-05:00</dc:date>
    <pr:presence rdf:parseType="literal" pr:source="http://www.cabezal.com/presence/presence.php?id=hpyle" >
      <pr:status>Online</pr:status>
      <pr:icon>http://www.cabezal.com/presence/online.png</pr:icon>
      <pr:name>hpyle</pr:name>
      <pr:messageLink>http://www.cabezal.com/presence/im.php?id=hpyle</pr:messageLink>
    </pr:presence>
    
    <items>
      <rdf:Seq>
        <rdf:li resource="http://www.cabezal.com/blog/archives/000533.shtml" />
      </rdf:Seq>
    </items>

  </channel>

  <item rdf:about="http://www.cabezal.com/blog/archives/000533.shtml">
    <title>something</title>
    <description>something...</description>
    <link>http://www.cabezal.com/blog/archives/000533.shtml</link>
    <dc:creator>hpyle</dc:creator>
    <dc:date>2003-04-18T08:27:51-05:00</dc:date>
    <pr:presence rdf:parseType="literal" pr:source="http://www.cabezal.com/presence/presence.php?id=hpyle" >
      <pr:status>Online</pr:status>
      <pr:icon>http://www.cabezal.com/presence/online.png</pr:icon>
      <pr:name>hpyle</pr:name>
      <pr:messageLink>http://www.cabezal.com/presence/im.php?id=hpyle</pr:messageLink>
    </pr:presence>
  </item>


</rdf:RDF>

Example (RSS 2.0)

<?xml version="1.0" encoding="utf-8"?> 
<rss version="2.0" 
  xmlns:pr="http://www.cabezal.com/ns/presence/">

  <channel>
    <title>Hugh's ramblings</title>
    <link>http://www.cabezal.com/blog/</link>
    <description>never knowingly underestimated</description>
    <pr:presence pr:source="http://www.cabezal.com/presence/presence.php?id=hpyle" />

  <item>
    <title>something</title>
    <description>something...</description>
    <link>http://www.cabezal.com/blog/archives/000533.shtml</link>
    <pr:presence pr:source="http://www.cabezal.com/presence/presence.php?id=hpyle" />
  </item>

  </channel>
</rss>