slide 86

Now Let’s Look at Some Real Stylesheets

<xsl:template match="address">
  <address>
    <xsl:apply-templates select="affil | subaffil"/>
    <xsl:apply-templates
      select="aline | city | cntry | email | fax |
              phone | postcode | province |
              state | web"/>
  </address>
</xsl:template>

<xsl:template match="affil">
  <affiliation>
    <xsl:apply-templates/>
  </affiliation>
</xsl:template>

<xsl:template match="subaffil">
  <subAffiliation>
    <xsl:apply-templates/>
  </subAffiliation>
</xsl:template>

<xsl:template match="aline | city | cntry | state |
                     province | postcode" >
  <line>
    <xsl:apply-templates/>
  </line>
</xsl:template>

<xsl:template match="phone|fax|email|web">
  <xsl:copy-of select="."/>
</xsl:template>