RDF Site Summary 1.0 Modules: Subscription

Authors

Kevin A. Burton , Independent

Version

Latest Version: http://purl.org/rss/1.0/modules/proposed/subscription/

Mon Jul 22 2002 06:15 PM ( init ) kab

Status

Proposed, Mon Jul 22 2002 06:28 PM

Rights

Copyright © 2000 by the Authors.

Permission to use, copy, modify and distribute the RDF Site Summary 1.0 Subscription Module Specification and its accompanying documentation for any purpose and without fee is hereby granted in perpetuity, provided that the above copyright notice and this paragraph appear in all copies. 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.

This copyright applies to the RDF Site Summary 1.0 Subscription Module Specification and accompanying documentation and does not extend to the RSS Module's format itself.

Description

The mod_subscription module supports the syndication of site subscription information along with RSS 1.0 XML feeds.

This information can be used to enable a number of very compelling features:

There are two main roles for this module. When mod_subscription is used from within a personal weblog these are essentially user subscriptions. When syndicated from a corporate (professional) site such as CNN, CNET, etc, these essentially form recommendations of external sites (further reading or affiliate links).

Namespace Declarations

Syntax

sub:channel

sub:channel is a sub-element of the RSS <channel> element. It is used as follows:

            
<sub:channel rdf:about="http://www.wired.com/news_drop/netcenter/netcenter.rdf">

    <!-- title for this subscription.  This is the title for the subscription
    locally and may have a different name than the official site.  User agents
    may wish to use the title of the RSS channel instead of the given title -->

    <dc:title>Wired News</dc:title>

    <!-- Can be any format but RSS (1.0) is recommended -->

    <dc:format>application/rss+xml</dc:format>

    <!-- optional site URL for use if :

        1. the main RSS feed becomes invalid and we need to discover a new RSS
           feed.

        2. we want to XSLT the a 'blogroll' on the server

    -->    
    <sub:site rdf:resource="http://www.wired.com"/>

    <!-- client specific subscription URLs (vendor resources).  This is provided
    for ease of use by adopters.  Ideally clients that need to invoke specific
    clients should incorporate vendor integration into their system.  For
    example it would be better to have radio produce these URLs internally (or
    via an external application) instead of assuming that all RSS producers will
    provide the URL. -->

    <sub:vendor sub:name="radio"
                rdf:resource="http://127.0.0.1:5335/system/pages/subscriptions?url=http%3A%2F%2F80211b.weblogger.com%2Fxml%2FscriptingNews2.xml"/>

</sub:channel>

sub:vendor

sub:vendor is an optional element for providing vendor specific subscription URLs for RSS channels.

            
<sub:vendor sub:name="radio"
            rdf:resource="http://127.0.0.1:5335/system/pages/subscriptions?url=http%3A%2F%2F80211b.weblogger.com%2Fxml%2FscriptingNews2.xml"/>

<sub:vendor sub:name="bonita"
            rdf:resource="view-rss:http://www.peerfear.org/rss/index.rss"/>

sub:site

sub:site is an optional element for providing the URL for the main site of a channel. This is optional since the linking RSS file is going to have a channel link.

            
<!-- optional site URL for use if :

    1. the main RSS feed becomes invalid and we need to discover a new RSS
       feed.

    2. we want to XSLT the a 'blogroll' on the server

-->    
<sub:site rdf:resource="http://www.wired.com"/>

SRDF support

mod_subscription supports the Simple RDF (SRDF) mechanism for integration within RDF applications. It is possible to generate RDF for a channel which uses mod_subscription with the included srdf.xsl XSL stylesheet.

It is also possible to store mod_subscription information in an external RDF file and link to it from within the channel element.

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

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
         xmlns:ref="http://purl.org/rss/1.0/modules/reference/"
         xmlns:dc="http://purl.org/dc/elements/1.1/"
         xmlns:sub="http://purl.org/rss/1.0/modules/subscription/"
         xmlns:l="http://purl.org/rss/1.0/modules/link/"
         xmlns="http://purl.org/rss/1.0/"> 

    <channel rdf:about="http://example.org/rss.rdf">
        <title>Example Feed</title>
        <link>http://www.example.org</link>
        <description>Simply for the purpose of demonstration.</description>
        
        <items>
            <rdf:Seq>
                <rdf:li resource="http://www.xmlhack.com/read.php?item=1725" />
            </rdf:Seq>
        </items>

        <l:link l:rel="http://purl.org/rss/1.0/modules/subscription/"
                l:type="application/rdf+xml"
                l:title="Subscriptions"
                rdf:resource="http://www.example.org/example-subscriptions.rdf"/>

    </channel>

    <item rdf:about="http://www.xmlhack.com/read.php?item=1725">

        <title>Relax NG schemas for XML Encryption and XML Signature</title> 
        <link>http://www.xmlhack.com/read.php?item=1725</link>

    </item> 
    
</rdf:RDF>

Example

This is an example of an RSS channel publishing two subscription channels.


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

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
         xmlns:ref="http://purl.org/rss/1.0/modules/reference/"
         xmlns:dc="http://purl.org/dc/elements/1.1/"
         xmlns:sub="http://purl.org/rss/1.0/modules/subscription/"
         xmlns="http://purl.org/rss/1.0/"> 

    <channel rdf:about="http://example.org/rss.rdf">
        <title>Example Feed</title>
        <link>http://www.example.org</link>
        <description>Simply for the purpose of demonstration.</description>
        
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://www.xmlhack.com/read.php?item=1725" />
            </rdf:Seq>
        </items>

        <sub:channel rdf:about="http://www.wired.com/news_drop/netcenter/netcenter.rdf">  
                    
            <dc:title>Wired News</dc:title>
            <dc:format>application/rss+xml</dc:format>
            <sub:site rdf:resource="http://www.wired.com"/>
            
        </sub:channel>
        
        <sub:channel rdf:about="http://www.peerfear.org/rss/index.rss">
            
            <dc:title>peerfear.org</dc:title>
            <dc:format>application/rss+xml</dc:format>
            <sub:site rdf:resource="http://www.peerfear.org"/>

        </sub:channel>

    </channel>

    <item rdf:about="http://www.xmlhack.com/read.php?item=1725">

        <title>Relax NG schemas for XML Encryption and XML Signature</title> 
        <link>http://www.xmlhack.com/read.php?item=1725</link>

    </item> 
    
</rdf:RDF>

RDF Example

This is an example of an RDF file publishing two subscription channels via mod_subscription. This file was automatically created with srdf.xsl

            
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:sub="http://purl.org/rss/1.0/modules/subscription/" 
         xmlns:rss="http://purl.org/rss/1.0/" 
         xmlns:dc="http://purl.org/dc/elements/1.1/"
         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

    <rdf:Description rdf:about="http://example.org/rss.rdf">
        <sub:channel>
            <rdf:Bag>
                <rdf:li rdf:resource="http://www.wired.com/news_drop/netcenter/netcenter.rdf"/>
                <rdf:li rdf:resource="http://www.peerfear.org/rss/index.rss"/>
            </rdf:Bag>
        </sub:channel>
    </rdf:Description>

    <sub:channel rdf:about="http://www.wired.com/news_drop/netcenter/netcenter.rdf">  
        
        <dc:title>Wired News</dc:title>
        <dc:format>application/rss+xml</dc:format>
        <sub:site rdf:resource="http://www.wired.com"/>
        
    </sub:channel>
    <sub:channel rdf:about="http://www.peerfear.org/rss/index.rss">
        
        <dc:title>peerfear.org</dc:title>
        <dc:format>application/rss+xml</dc:format>
        <sub:site rdf:resource="http://www.peerfear.org"/>

    </sub:channel>

</rdf:RDF>

When rendered as a RDF graph the semantic relationship looks like: