Examples from Chapter 5 of The XML Bible, 2nd Edition: Attributes, Empty Tags, and XSL
Listing 5-1: A complete XML document using attributes to store baseball statistics
Listing 5-2: An XSLT style sheet
Listing 5-3: An XSLT style sheet with instructions to extract the YEAR attribute of the SEASON element
Listing 5-4: An XSLT style sheet with instructions to extract LEAGUE elements
Listing 5-5: An XSLT style sheet with instructions to extract DIVISION and TEAM elements
Listing 5-6: An XSLT style sheet that places players and their statistics in a table
Listing 5-7: An XSLT style sheet that separates batters and pitchers
Listing 5-8: An XSLT style sheet for element-based baseball statistics
Copyright 1999, 2001
Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified at January 28, 2001