O'Reilly logo

XML and Java™ from scratch by Nicholas Chase

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding Elements and Attributes

What we ultimately want to end up with at the top of the page is a series of XHTML links that bring us to the appropriate vendor's material. If this were HTML, the relevant parts of the page would look like Listing 2.25.

We've been leaving out a lot of the normal XHTML elements for the sake of clarity. When we're finished, we'll put them back in.

Listing 2.25. catalog.xsl: The XHTML We're Trying to Emulate
0: <a href="#Conners Chair Company"><H2>Conners Chair Company</H2></a>
1: <a href="#Crazy Marge's Bed Emporium">
1a:        <h2>Crazy Marge's Bed Emporium</h2></a>
2: <a href="#Wally's Wonderful World of Furniture">

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required