There may be times when the feed you subscribe to uses elements that are not part of one of the feed formats. Extension XML extends the specifications to support application-specific data or objects, similar to a plug-in system for feeds. Extension XML refers to a collection of elements outside of the feed format, also known as namespace. Each namespace is identified by a unique URL. Namespace URLs are defined at the beginning of a feed, and are often associated with an easier to remember string. This string is known as a namespace prefix.
For example, a feed that has bank account information might use a bank namespace identified by the URL http://www.example.com/bank, and a namespace prefix of bank. This namespace might have elements such as owner, address, checking and savings. An entry using this namespace would look like the one in Listing 1-3.
Listing 1-3 An Atom extension XML example
<feed xmlns="http://www.w3.org/2005/Atom" |
xmlns:bank="http://www.example.com/bank"> |
... |
<item> |
<title>Account2004</title> |
<bank:owner>John Doe</bank:owner> |
<bank:address>1 Infinite Loop, Cupertino, CA 95014</bank:address> |
<bank:checking>111829384</bank:checking> |
<bank:savings>949289291</bank:savings> |
</item> |
There are many additional namespaces already defined. One of the most popular ones if for an iTunes podcast. A good resource for finding namespaces is The Dublin Core Metadata Initiative, as well as rss-extensions.org.
Understanding the structure and workflow of a feed is important to using the Publication Subscription framework. Knowing about the components of a feed and the organization of the four major feed standards will help you understand the organization of the Publication Subscription framework and its components.
Last updated: 2007-05-11