The select attribute

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">

  <xsl:template match="/">
    <html>
       <xsl:apply-templates select="catalog"/>
    </html>
  </xsl:template>

  <xsl:template match="catalog">
    <head>
       <title><xsl:value-of select="title"/></title>      
    </head>
    <body>
       <h1><xsl:value-of select="title"/></h1>      
       <xsl:apply-templates select="composition"/>
    </body>
  </xsl:template>

  <xsl:template match="composition">
    <h3><xsl:value-of select="name"/></h3>
  </xsl:template>

</xsl:stylesheet>

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

Copyright 1999 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified September 1, 1999