Home > Installation & Configuration Download RBT v1.3.1

RSS Configuration

Overview

RBT provides basic support for RSS. With the proper configuration, RBT document result sets can provide the content for RSS feeds. It is expected that the user configuring RBT RSS is familiar with RSS file setup, XML and URL encoding. The following should be considered when designing documents for RSS feeds:

  • The result set returned should be limited in size and execute efficiently - RSS feeds should be short and fast.
  • Document formatting will not be displayed in the feed, only the tabular result set data will display.
  • There will be no access control on RBT documents configured for RSS feeds.

Administrative Setup

The preliminary RBT RSS setup is as follows:

  • Add the following elements to the RBT configuration XML file.
        <rssTitle>RBT RSS document default channel name</rssTitle>
        <rssDescription>RBT RSS document default description</rssDescription>
        <rssUrl>RBT RSS document default url</rssUrl>
                                
  • In the RBT Administrator, create a group named "rss"
  • In the RBT Administrator, create a user named "rss" with password "rss" and add the rss user to the rss group
  • Create documents for RSS feeds as the "rss" user

RBT RSS Channels

RBT RSS channel files reside in the [rbt-web-root]/rsschannel directory. The default RSS file is rbt.rss which is a standard rss version 2.0 file. RBT documents are configured as URL entries in the <item> elements of the channel files. A URL similar to the one shown below will access the default (rbt.rss) file:

        http://[my-server-name]/rbt/rss
    

You can specify custom channel files by adding a channel parameter as follows:

        http://[my-server-name]/rbt/rss?channel=some-other-file.rss
    

RBT Document Feed Configuration

RSS feeds are mapped to RBT documents via the <item> element in the channel file similar to the example below:


    <item>
        <title>RSS Test</title>
        <link>http://localhost:8088/rbt/rss?documentName=rsstest</link>
        <description>RSS Test Document</description>
    </item>

the parameter "documentName=rsstest" specifies the RBT document name. The document must be owned by the rss user. When run, the output will display document results in tabular form similar to what is shown below:

rss feed example

Passing Additional Parameters to RSS Document

In addition to the documentName parameter, the RSS framework accepts other parameter types as described in the table below. The parameter format is of the form [parameter-type]-[position], for example - param-1, style-3 format-2. In each case the position number is significant.

Type NameDescription
paramParameters of type param-1, param-2, param-3 ... are used to pass runtime filter parameters to the RSS document. The parameters positions correspond to the order of the runtime parameter entries in the design filter pane - param-1 is the first runtime parameter, param-2 is the second runtime parameter etc.Date parameters must be of the form "yyyy-mm-dd" and timestamp of the form "yyyy-mm-dd hh:mm:ss".
headerParameters of type header-1, header-2, header-3 ... are used to set the column header names in RSS document.
formatParameters of type format-1, format-2, format-3 ... are used to pass date and number format masks to the RSS document to be applied to the associated data column - format-1 will be applied to column 1, format-2 will be applied to column 2 etc. You can for descriptions of available formatting symbols here.
styleParameters of type style-1, style-2, style-3 ... are used to pass CSS style specifications be applied to the to associated data column - style-1 will be applied to column 1, style-2 will be applied to column 2 etc. The style string should be the text that would be placed in an HTML element "style" attribute. For example, "font-color: red". Not all browsers will render the style in an RSS feed.

Passing parameters in the RSS <item> element can be a bit tricky. Because we are in an XML document, special XML characters such as the & must be properly escaped. In addition, the URL must be encoded properly - a space will become %20, pound sign (#) becomes %23 etc.

Lets look at an example. Suppose we wanted a better format for the example RSS feed shown above. Lets set the headers to more user-friendly names, format the average salary more appropriately and change the font color. We would want a URL in the <link> element something like (lines are broken to fit page):

             <link>http://localhost:8088/rbt/rss?documentName=rsstest&header-1=Name&header-2=Avg Salary
                &header-3=ID&format-2=$###,###.00&style-2=font-color:blue;</link>
       
Unfortunately there are a lot of characters we need to escape and encode. First we need to escape the embedded ampersands (&) for the XML, so we end up with:
             <link>http://localhost:8088/rbt/rss?documentName=rsstest&amp;header-1=Name&amp;header-2=Avg Salary
                &amp;header-3=ID&amp;format-2=$###,###.00&amp;style-2=font-color:blue;</link>
       
Now we need to encode the special URL characters properly so the final - and correct - <link> element looks like:
             <link>http://localhost:8088/rbt/rss?documentName=rsstest&amp;header-1=Name&amp;header-2=Avg%20Salary&amp;header-3=ID
                &amp;format-2=%24%23%23%23%2C%23%23%23.00&amp;style-2=color%3Ablue%3B</link>
       
When we run the RSS document with the URL parameters above the output looks like this:

rss feed example