<?xml version="1.0"?>

<!--
	Author: Mael Guillemot
	File: icsi-to-html-black.xsl
	Date: April 2004
	Purpose: Convert from the ICSI XML annotation to HTML

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


<xsl:output method="html" indent="yes" encoding="ISO-8859-1"/>
<xsl:strip-space elements="*"/>

<xsl:template match="/">

<html>
	<body>
	<table>
		<xsl:apply-templates select="/Meeting">
		</xsl:apply-templates>
	</table>
	<hr></hr>
	<table>
		<xsl:apply-templates select="/Meeting/Preamble">
		</xsl:apply-templates>
	</table>
	<hr></hr>
	<h1>Transcript</h1>
		<xsl:apply-templates select="/Meeting/Transcript">
		</xsl:apply-templates>
	</body>
</html>
</xsl:template>



<xsl:template match="Meeting">
	<h1>ICSI Meeting: <xsl:value-of select="@Session"/></h1>
<xsl:text> DateTimeStamp: </xsl:text>
<xsl:value-of select="@DateTimeStamp"/>
<xsl:text> | VersionDate: </xsl:text>
<xsl:value-of select="@VersionDate"/>
<xsl:text>&#xA;</xsl:text>
</xsl:template>




<xsl:template match="Preamble">
		<xsl:apply-templates select="Notes">
		</xsl:apply-templates>
		<xsl:apply-templates select="Participants">
		</xsl:apply-templates>
</xsl:template>




<xsl:template match="Transcript">
<h2>StartTime: <xsl:value-of select="@StartTime"/> | EndTime:  <xsl:value-of select="@EndTime"/></h2>
	<table>
		<xsl:apply-templates select="Segment">
		</xsl:apply-templates>
	</table>
</xsl:template>



<xsl:template match="Notes">
<h2>General notes about the meeting:</h2>
<br></br>
<xsl:value-of select="."/>
</xsl:template>


<xsl:template match="Participants">

<xsl:text>Participants:</xsl:text>
<xsl:text>&#xA;</xsl:text>
    <table border="1">
      <tr bgcolor="#9acd32">
        <th align="left">Participant ID</th>
        <th align="left">Channel</th>
      </tr>
      <xsl:for-each select="Participant">
      <tr>
        <td>
              <xsl:value-of select="@Name"/>
        </td>
        <td>
              <xsl:value-of select="@Channel"/>
        </td>
         <td>
              <xsl:value-of select="position()"/>
        </td>

      </tr>
      </xsl:for-each>
	</table>
</xsl:template>



<xsl:template match="Segment">
<tr>
<td>
<b><xsl:value-of select="@Participant"/></b>
<font size="-1"><font color="gray">_[<xsl:value-of select="@StartTime"/>]: 
</font></font>
<b>
<xsl:element name="font">
<xsl:attribute name="color">
black
</xsl:attribute>
<xsl:value-of select="."/>
</xsl:element>
</b>
<font size="-1"><font color="gray">
[<xsl:value-of select="@EndTime"/>]
</font></font>
</td>
</tr>
<xsl:text>&#xA;</xsl:text>
</xsl:template>


</xsl:stylesheet>

