HTML and CSS Reference
In-Depth Information
The description Element
The description element contains a sentence or sentence fragment that describes the channel, as demonstrated in
Listing 8-4.
Listing 8-4. A Channel Description in RSS
<description>The latest news about rock star John Smith.</description>
Optional Elements
In RSS 2.0 news feeds, the channel element has 16 optional subelements, including category , cloud , copyright , docs ,
generator , image , language , lastBuildDate , managingEditor , pubDate , rating , skipDays , skipHours , textInput ,
ttl , and webMaster . We'll look at all of these subelements in more detail here.
A common feature of all RSS 2.0 elements providing a URL is that they should begin with a URI scheme defined
by IANA [10], for example, http:// , https:// , news:// , mailto:// , or ftp:// . Note that the http:// and ftp://
schemes can be used from RSS 2.0 onward.
The category Element
One or more categories can be specified for RSS channels, which can be used for classification and filtering.
For example, an RSS news feed of a web site dedicated to Semantic Web events might contain categories such as
conferences, workshops, specifications, and so on. Another example might be a bookseller who uses categories to
indicate the category of the latest book releases so that potential customers can easily track the latest topics of a
certain category (for example, fans of history topics are not necessarily interested in technical topic). The category
element can be used for not only the entire channel but also for each item separately. Listing 8-5 shows an example.
Listing 8-5. A category Element in RSS
<category>Workshops</category>
The element has an optional domain attribute that is a URI identifying a taxonomy (Listing 8-6).
Listing 8-6. Category with Domain
<category domain="http://www.example.com/vocab">WS</category>
The value of the category element declared for the channel can be used by portals for classifying RSS news feed
channels, while the values of category elements are often displayed as hyperlinks, or used as filters (considered as
tags in feed readers). By clicking one of these links, the feed reader hides news entries from all other categories.
The cloud Element
To receive immediate notifications about channel updates, a publish-subscribe protocol can be written for RSS feeds
with the cloud element. It specifies a web service that supports the rssCloud interface (which can be implemented
in HTTP-POST, XML-RPC, or SOAP 1.1). Two request methods are supported: a client-to-cloud call to request
notification and a cloud-to-client call to perform notification. A client request has five required parameters, including
the name of the remote procedure to be called by the cloud when an update occurred, the TCP port of the client, the
remote procedure call path of the client, the string xml-rpc (in case the client uses XML-RPC) or soap (in case SOAP is
used), and the URLs of RSS files. The IP address used for the request for notification must coincide with the IP address
that will receive the notifications. Listing 8-7 shows an example.
 
Search WWH ::




Custom Search