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

  <xsl:output method="html" encoding="ISO-8859-1"/>

  <xsl:template match="veranstaltung">
    <html>
      <body>
        <title><xsl:value-of select="@titel"/></title>
        <h1><xsl:value-of select="@titel"/></h1>
        <p>Dozenten:</p>
        <ul>
          <xsl:for-each select="dozent">
            <li>
              <xsl:apply-templates select="self::node()"/>
            </li>
          </xsl:for-each>
        </ul>
        <xsl:apply-templates select="zeit"/>
        <xsl:apply-templates select="raum"/>
        <hr/>
        <p>Alle Angaben ohne Gewähr</p>
      </body>
    </html>
  </xsl:template>

  <xsl:template match="dozent[position()&lt;last()]">
    <xsl:apply-templates select="name"/>,
  </xsl:template>
  <xsl:template match="dozent">
    <xsl:apply-templates select="name"/>
  </xsl:template>

  <xsl:template match="zeit">
    <p>
      Uhrzeit: <em> 
    <font>
      <xsl:choose>
        <xsl:when test="@änderung_nach_release='ja'">
          <xsl:attribute name="color">#FF0000</xsl:attribute>
        </xsl:when>
        <xsl:otherwise>
          <xsl:attribute name="color">#000000</xsl:attribute>
        </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="node()"/>
    </font>
  </em>
</p>
</xsl:template>

<xsl:template match="raum">
  <p>Raum: <em> <xsl:apply-templates/> </em></p>
</xsl:template>

</xsl:stylesheet>
