HTML and CSS Reference
In-Depth Information
The title Subelement
The titles of RSS channel items can be declared by the title subelement of the item element. Listing 8-24 shows an
Listing 8-24. The Title of an RSS Item
<title>A new W3C standard</title>
The default namespace for RSS is , which is the permanent URL form of the RDF Site
Summary (RSS) 1.0 namespace, . The namespace can be provided in the form
presented in Listing 8-25.
Listing 8-25. Declaring the RSS Namespace
<rss version="2.0" xmlns:rss=" ">
Additional data on channel updates can be provided by the web syndication namespace of RSS
( ). It extends the RSS channels with three elements:
element. Allowed values are hourly , daily , weekly , monthly , and yearly . If omitted, daily is
The period over which the news channel is updated can be described by the
The frequency of updates can be expressed in relation to the update period with the
sy:updateFrequency element. Its value is a positive integer.
element. It should be a #PCDATA date in one of the W3C date and time formats [16].
To calculate the publishing schedule, a base date can be defined by the
By default, news feed entries are plain-text contents. However, news aggregators often support (X)HTML
markup that are not allowed in XML. Entity-encoded and CDATA-escaped contents can be provided with the
content:encoded element defined by the namespace. The
content:encoded element is especially useful if the hyperlink delimited by the link element is not enough and
additional hyperlinks are needed (in the news item content). Although text formatting and other markup codes can
also be written this way, they are ignored by many RSS readers.
There is an element, atom:link , that can be used from another syndication format, Atom, to provide the
self-link of the news feed channel. To apply this element, the Atom namespace
should be declared.
Advanced news feeds typically contain at least the namespace declarations presented in Listing 8-26.
Listing 8-26. Typical Namespace Declarations in RSS
<rss version="2.0"
xmlns:content=" "
xmlns:dc=" "
xmlns:sy=" "
xmlns:atom=" "
Search WWH ::

Custom Search