<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
  <xsl:template match="meeting">
    <html>
      <head>
	<title><xsl:value-of select="@id"/></title>
      </head>    
      <body bgcolor="#ffffff">
	<h1>
	  <xsl:value-of select="@id"/>
	</h1>
	<h2>
	  Those invited
	</h2>
	<dl>
	  <xsl:apply-templates select="invitees"/>
	</dl>
	<h2>
	  Apologies
	</h2>
	<ul>
	  <xsl:apply-templates select="invitees/attendee[ @attendance='prevented']"/>
	</ul>
	<h2>
	  Agenda
	</h2>
	<ol>
	  <xsl:apply-templates select="agenda"/>
	</ol>
      </body>
    </html>
  </xsl:template>

  <xsl:template match="invitees">
    <dl>
      <xsl:apply-templates select="attendee"/>
    </dl>
  </xsl:template>

  <xsl:template match="attendee">
    <dt>
      <xsl:value-of select="name"/> 
      <em>
	<xsl:value-of select="@meeting-role"/>
      </em>
    </dt>
    <dd>
      <xsl:value-of select="position"/>
    </dd>
  </xsl:template>

  <xsl:template match="agenda">
    <ul>
      <xsl:apply-templates select="item"/>
    </ul>
  </xsl:template>    

  <xsl:template match="item"> 
      <li>
	<xsl:apply-templates />
      </li>
  </xsl:template>    
  
</xsl:stylesheet>
