<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
  <html>
    <head>
      <title>Adressliste</title>
    </head>
    <body>
      <table cellpadding="5" cellspacing="3">
        <xsl:for-each select="CONTACTLIST/CONTACT">
        <xsl:sort select="NAME" />
          <tr>
            <td bgcolor="lightgrey"><font face="tahoma,arial" size="-1">
              <b><xsl:value-of select="NAME" /></b>
            </font></td>
            <td bgcolor="lightgrey"><font face="tahoma,arial" size="-1">
              <xsl:if test="PHONE[@type='mobile']">
                <xsl:value-of select="PHONE[@type='mobile']" />
              </xsl:if>
              <xsl:if test="not(PHONE[@type='mobile'])">
                N/A
              </xsl:if>              
            </font></td>
          </tr>
        </xsl:for-each>
      </table>
    </body>
  </html>
</xsl:template>

</xsl:stylesheet>