Examples from Chapter 15 of The XML 1.1 Bible, XSL Transformations
Listing 15-1: An XML Periodic Table with Two Atoms: Hydrogen and Helium
Listing 15-2: An XSLT Style Sheet for the Periodic Table with Two Template Rules
Listing 15-3: The HTML Produced by Applying the Style Sheet in Listing 15-2 to the XML in Listing 15-1
Listing 15-4: An XSLT Style Sheet That Recursively Processes the Children of the Root
Listing 15-5: An XSLT Style Sheet with One Rule for the Root Node
Listing 15-6: Templates Applied to Specific Classes of Element with Select
Listing 15-7: An XSLT Style Sheet That Selects the UNITS Attribute with @
Listing 15-8: An XSLT Style Sheet That Selects Only Those ATOM Elements Whose STATE Attribute Has the Value GAS
Listing 15-9: A Style Sheet That Outputs Only Those Elements with Known Melting Points
Listing 15-10: A Table of Melting Point versus Atomic Number
Listing 15-11: A Table of Melting Point versus Atomic Number Using the Abbreviated Syntax
Listing 15-12: A Style Sheet That Numbers the Atoms in the Order They Appear in the Document
Listing 15-13: An Empty XSL Style Sheet
Listing 15-14: An XSLT Style Sheet That Strips Comments from a Document
Listing 15-15: A Style Sheet That Copies only ATOM Elements That Have MELTING_POINT Children
Listing 15-16: An XSLT Style Sheet That Counts Atoms
Listing 15-17: An XSLT Style Sheet That Counts Atoms
Listing 15-18: An XSLT Style Sheet That Sorts by Atomic Number
Listing 15-19: An XSLT Style Sheet That Uses Modes to Format the Same Data Differently in Two Different Places
Copyright 2004
Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified March 1, 2004