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

  <xsl:output method="html" indent="yes" />
    
  <xsl:template match="/">
    <xsl:apply-templates />
  </xsl:template>

  <xsl:template match="kurs">
    <html>
      <head><title><xsl:value-of select="titel"/></title></head>
      <link rel="stylesheet" href="../../../kurse.css"/>
      <body>
        <hr />
        <h1 class="center"><xsl:value-of select="titel"/></h1>
	<h2 class="center">Ein Kompaktkurs f&#x00FC;r die Praxis</h2>
	<hr />
        <xsl:apply-templates select="referent">
          <xsl:sort data-type="text" select="name"/>
        </xsl:apply-templates>
        <hr />
	<xsl:apply-templates select="inhalt//p"/>
        <hr />
      </body>
    </html>
  </xsl:template>

  <xsl:template match="referent">
     <h3 class="center"><a href="mailto:{@email}"><xsl:value-of select="vorname" />
     <xsl:text> </xsl:text>
     <xsl:value-of select="name" /></a>,
     <xsl:choose>
       <xsl:when test="organisation/@homepage"><a href="{organisation/@homepage}"><xsl:value-of select="organisation" /></a></xsl:when>
       <xsl:otherwise><xsl:value-of select="organisation" /></xsl:otherwise>
     </xsl:choose>
     </h3>
  </xsl:template>

  <xsl:template match="p">
    <p><xsl:value-of select="."/></p>
  </xsl:template>

</xsl:stylesheet>

