Home > Articles > Web Services > XML

Seven Steps to XML Mastery, Step 2: Display for the Web

  • Print
  • + Share This
Now that you've conquered step 1, reading XML code, it's time to learn how to prep that XML code for publishing on the Web. In step 2 of his series, Frank Coyle gives the lowdown on how to structure web pages with some key XHTML elements and attributes to take advantage of the power of Cascading Style Sheets and to get things ready for upcoming work with XSLT.
For more information about this series, start by reading Frank Coyle's introduction, Seven Steps to XML Mastery: About This Series.
From the author of

With step 1 to XML mastery—learning how to read XML code—behind us, it’s time to go to work. In this article, we move on up to step 2 and tackle the often tricky problem of how to get XML content out onto the Web. ZwiftBooks, a web-based bookseller that prides itself in getting books to customers who "need it now," has hired you to help increase ZwiftBooks’ web presence—and, by implication, improve the bottom line. You’ve convinced the ZwiftBooks management that XML-izing their data will lead to only good things for the company.

Welcome to Duty

It’s the first day of work. Each week, manager Bob calls together the web design team (Wilma and company) and hands them a report listing the five most popular ZwiftBooks and the five most popular authors. Wilma takes the list, cranks up Dreamweaver, her favorite web development environment, and inserts the titles, authors, links, and prices—all the information that management would like see reflected in the web site.

Then Bob turns to you and asks, "If we get our book and pricing data into XML, will we have more timely updates without asking our web design team to put in more hours?" Your answer, of course, will be "Yes," but to keep that answer from being a vacant promise, you’ll need to combine a bit of XHTML with some XSLT. (We’ll meet XSLT in step 3.)

Before we look at XSLT, we need to perform some due diligence and make sure that the web team at ZwiftBooks is set up to allow XSLT to work its magic. Our goal is that, each time a user visits the site, he or she will encounter the most recent ZwiftBooks data.

  • + Share This
  • 🔖 Save To Your Account