RSS Traits is an RSS (Really Simple Syndication) 2.0 module that enables RSS entries to possess pre-defined traits beyond those typically associated with RSS feeds.
This work is licensed under a Creative Commons License.
This document is in draft status. Please send any feedback to Richard Ziade.
Despite its inherently generic nature, feed syndication has been primarily relegated to the domain of news sources and blogs. Your typical feed is comprised of some general information about the channel source followed by a collection of headlines and links. Often times, a description is provided along with the headline (typically a blurb) along with some additional metadata about the entry. Through the use of feed readers, users are able to keep abreast of updates to their favorite news sources and blogs.
While this has proven to be a great way to manage large amounts of information from disparate sources, the one-dimensional nature of RSS belies its true potential as a powerful information tool.
RSS Traits is an attempt to give individual feed entries characteristics that can be leveraged by consuming clients and applications. Within a typical channel feed's XML payload, channel providers can define one or more taxonomies and the potential values within each and apply those values to the individual entries within that feed. Optionally, channel providers can describe to consuming clients what those taxonomies mean and how they should be presented to users.
The real power of Traits is realized on the consuming end. Equipped clients and applications can provide filtering, sorting and presentation enhancements that are driven by the Traits data provided for in the feed.
The primary purpose of RSS Traits is to display information in its most up-to-date form for the user. As a result, the normal behavior associated with feed readers - to retrieve and archive all feeds for consumption - is less relevant and often runs counter to leveraging the RSS Traits module. For example, a feed with Traits that display the five-day forecast for a particular city is more transient in nature. It's preferable to have such information overlayed as it comes in. There's no need for users to "catch up" on old entries for a weather feed. They simply want the most current information. Another good example is a workflow application where an entry can have five different states (e.g. "submitted", "approved", "funds allocated", "shipped", "confirmed"). As entries move along the workflow, it's most useful to see the current state of affairs rather than wade through older entries that simply reflect different points in time along the process.
The namespace for RSS Traits is:
The recommended prefix is trt, resulting in the namespace declaration:
RSS Traits is an RSS 2.0 module. Elements are included as part of the <channel> and <item> elements.
To utilize RSS Traits, you must first establish at least one taxonomy in the <channel> element of an RSS feed. Here is an example of a Priority taxonomy and all its possible traits, as well as a simple, lastCommentDate taxonomy that displays the last time a post was commented on :
This element encapsulates a taxonomy and the possible traits that a particular feed entry may possess for this particular taxonomy.
A feed can have one or more taxonomies. If a feed references multiple taxonomies, the order in which the taxonomies are listed is the order of priority for listing and sorting purposes.
Below are the required and option attributes for the <taxonomy> element:
The name of the taxonomy.
In feeds with multiple taxonomies, no two taxonomies may share the same name.
|label||The label of the taxonomy, for display purposes.||No|
The type of taxonomy to establish. There are four types of taxonomies:
|currency||If the possible information for the type of taxonomy is numeric, the author can optionally include a currency attrribute for display and formatting of money values. The currency abbreviations should be compliant with ISO 4217.||No|
|description||A description of the taxonomy.||No|
|owner||The name of the person or entity that owns or maintains this taxonomy.||No|
The default trait to be applied to a feed entry if no trait is explicitly applied.
The defaultTrait must be one of the possible traits listed under the taxonomy.
If no defaultTrait attribute is specified for a particular taxonomy and the feed entry itself does not account for a taxonomy, the entry is assumed to not have any trait under that particular taxonomy.
Taxonomies that are of type="enumeration" can have on or more traits associated with them. For example, a Priority taxonomy can potentially have three traits: High, Medium & Low.
If a feed entry references multiple taxonomies, the order in which the traits are listed is the order of priority for listing and sorting purposes. If a feed entry does not reference a particular taxonomy at all, it is desginated lower priority to other entries that do reference that taxonomy. To follow the example above, in a feed with 10 entries, the order of entries is sorted by High, Medium, Low and then those that have no references to the Priority taxonomy.
Each trait definition is accounted for in a <trt:trait> element:
The name of the trait.
In taxonomies with multiple traits, no two traits may share the same name.
|label||The label of the trait, for display purposes.||No|
|description||A description of the trait.||No|
The color associated with this value in either W3C colors as named in the HTML 4.01 Specification or in the format of an RGB value in hexadecimal notation preceded by a '#' sign, specified in the CSS1 Specification.
Note: The color of a particular value can be used in numerous ways by consuming clients. Color is a potentially useful interface alternative to simply presenting the named value under a particular taxonomy.
The location of an image to be associated with this value. The image should be in either .jpg, .gif or .png format and no larger than 32 pixels in width and height.
Images associated with particular values are another effective interface mechanism. Images used in this context should be perceived more as icons or symbols to be displayed in a list or tabular format.
The preferred format for images is .gif or .png with transparency.
This element resides inside the <item> element and effectively uses the taxonomies and a corresponding trait to give a feed entry additional characteristics. If multiple taxonomies exist, multiple itemTrait elements are used to apply traits to a particular entry.
For example, if the Priority and lastCommentDate taxonomies established above were being applied to a single item, they would appear as follows:
A <trt:itemTrait> is comprised of two required attributes:
This attribute contains the taxonomy name of the trait to be applied to the entry. Note, no more than one itemTrait can refer to the same taxonomy.
This attribute contains the corresponding trait(s) to the referenced taxonomy. An item can possess more than one trait for any single taxonomy. In such a case, the multiple trait names should be comma-separated within the trait attribute.
A simple way to leverage this module is to categorize entries into handful of categories commonly associated with blogs and news feeds. Publishers can not only associate certain entries with certain categories, but specify colors and icons to highlight which entries belong in which category.
Note also that consuming applications can provide sorting and filtering capabiltiies that are tailored to the taxonomies handed down in the feed.
Another relatively simple use of the Traits module is to establish a mechanism for notices that are not typically part of the normal stream of information that comes from a feed. This is similar to "sticky" posts commonly seen in forums.
As outlined in the specification, entries with traits are deemed higher priority than those without. Clients can also provide filtering capabilties that could tune in (or out) any particular entry based on its traits.
For the past year, you'll often find creative use of RSS to not only provide headlines from news sources and blogs, but to deliver results from more dynamic sources. Some examples include tracking packages, validating markup code, or tracking auctions on eBay via RSS. Such specialized uses really highlight the power of RSS as not only a news-gathering tool but a powerful mechanism for gathering and tracking specialized types of information.
The below example delivers the five-day forecast for the New York area. Each entry is denoted with a visual representation of the type of weather to expect for each day.
All of the examples shown so far illustrate how a single taxonomy can enrich the information delivered through RSS. The Traits really shines when multiple taxonomies are applied, thus greatly enriching the information delivered through a single feed. This allows for far more powerful uses in business contexts that require workflow-sensitive information.
In the below example, a single feed is tracking multiple timesheets along with their priority level, their current status, and the office they're associated with. Consuming applications can present this data in a tabular format and provide sorting and filtering capabilties that dynamically tailored to the taxonomies delivered.