I want to add something like this to the footer so readers can contact me if there's a problem with the page:

Elliotte Rusty Harold<br/>

This information comes from the maintainer element:

  <maintainer email="" 

So we need a way to get content from attributes in the input document. This is accomplished by prefixing the attribute name with @.

  <xsl:template match="catalog">
       <title><xsl:value-of select="category"/></title>      
       <h1><xsl:value-of select="category"/></h1>      
       <xsl:apply-templates select="composition"/>
       Copyright <xsl:value-of select="copyright"/><br/>
       Last Modified: <xsl:value-of select="last_updated"/><br/>
       <xsl:apply-templates select="maintainer"/>

  <xsl:template match="maintainer">
    <xsl:value-of select="name"/><br/>
    <xsl:value-of select="@email"/>

View Transformed Document in browser
Previous | Next | Top | Cafe con Leche

Copyright 1999, 2000 Elliotte Rusty Harold
Last Modified October 10, 1999