Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Process Atom 1.0 with XSLT

Use XPath expressions to navigate Atom documents, create or transform Atom source files using XSLT

Uche Ogbuji (uche.ogbuji@fourthought.com), Principal Consultant, Fourthought, Inc.
Photo of Uche Ogbuji
Uche Ogbuji is a consultant and co-founder of Fourthought Inc., a software vendor and consultancy specializing in XML solutions for enterprise knowledge management. Fourthought develops 4Suite, an open source platform for XML, RDF, and knowledge-management applications. Mr. Ogbuji is also a lead developer of the Versa RDF query language. He is a computer engineer and writer born in Nigeria, living and working in Boulder, Colorado, USA. You can find more about Mr. Ogbuji at his Weblog Copia, or contact him at uche.ogbuji@fourthought.com.

Summary:  Atom 1.0 is the emerging Internet Engineering Task Force (IETF) standard for Web feeds -- information updates on Web site contents. Since Atom is an XML format, XSLT is a powerful tool for processing it. In this tutorial, Uche Ogbuji looks at XSLT techniques for processing Atom documents, addressing real-life use cases.

Date:  13 Dec 2005
Level:  Intermediate PDF:  A4 and Letter (385 KB | 30 pages)Get Adobe® Reader®

Activity:  7723 views
Comments:  

Before you start

Learn what to expect from this tutorial, and how to get the most out of it.

About this tutorial

This tutorial provides a step-by-step look at how to process Atom 1.0 with XSLT. Atom is an important format for conveying information about Web sites that are organized into episodic content in some way. This might be Weblogs where new entries are published from time to time, event listings, multi-media programs and schedules, and much more. The breadth of Atom's domain is illustrated in the following description on the home page:

Atom is the name of an XML-based Web content and metadata syndication format, and an application-level protocol for publishing and editing Web resources belonging to periodically updated websites.

All Atom feeds must be well-formed XML documents, and are identified with the application/atom+xml media type.

Since well-formedness is of paramount importance in Atom, XSLT is a processing technology that comes quickly to mind. XSLT is a domain-specific language for transforming XML from one format to another, or to text or HTML for presentation. XSLT transforms are an effective cross-platform and cross-language means of processing Atom. This tutorial provides the building blocks for such processing.


Objectives

This tutorial shows you how to navigate the basic structure of Atom 1.0 documents using XPath expressions, how to use these expressions to drive XSLT transformations of Atom source files, and how to deal with the complications of text and markup embedded in Atom files. You will also learn how to use XSLT templates to generate valid Atom files, and how to check the validity of the results.


Prerequisites

This tutorial is written for developers who are familiar with XML, XPath, and XSLT. You should have some familiarity with XHTML and Atom, although the latter is a simple format that you can probably get a good grasp of by looking at the examples early on in this tutorial. See Resources for articles and tutorials that cover these topics. Some of the examples in this tutorial are taken from the background article on Atom 1.0 found in Resources.


System requirements

To run the examples in this tutorial, you need an XSLT processor, preferably one that supports EXSLT (see Resources). I use 4Suite XML 1.0b2. You should also have a recently released Web browser version. When displaying browser output examples, I show screenshots of Firefox 1.0.7 on Fedora Core 4 Linux. Firefox is a popular Web browser available on Windows, Mac OS X, Linux, and other platforms. (Firefox 1.5 is now out, and I strongly encourage you to use that version.)

1 of 9 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=XML
ArticleID=138119
TutorialTitle=Process Atom 1.0 with XSLT
publish-date=12132005
author1-email=uche.ogbuji@fourthought.com
author1-email-cc=dwxed@us.ibm.com

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.