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


  <!-- ================================================================== -->
  <!-- messageboard.xsl (v001) -                                          -->
  <!-- Created 30.08.2005 - Even Halvorsen (even.halvorsen@usit.uio.no)   -->
  <!-- ================================================================== -->


  <xsl:include href="../../../system/api-v001.xsl"/>
  <xsl:include href="../../../felles/ressurser/output-method-html-v001.xsl"/>
  <xsl:include href="../../../felles/ressurser/breadcrumb-v001.xsl"/>

  <!-- Komponenter som brukes i dokumentet -->
  <xsl:include href="../../../common/components/structuredtext/v002/structuredtext.xsl"/>
  <xsl:include href="../../../common/components/date/v001/date.xsl"/>

  <xsl:template match="/">
    <html>
      <head>
        <title><xsl:value-of select="messageboard/title" />.</title>
        <style type="text/css">
          div.breadcrumb-xsl {font-size:80%}
          div.date-user {font-size:.9em; margin-bottom:-.5em; }
          div.date-user p.date {display:inline;}
          div.date-user p.user {display:inline;}
          h2 {margin:1em 0 .3em; 0;}
        </style>
      </head>
      <body>
        <xsl:call-template name="prefixed-breadcrumb" />
        <xsl:apply-templates /> 
      </body>
    </html>
  </xsl:template>

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

  <xsl:template match="introduction">
    <xsl:apply-templates />
  </xsl:template>

  <xsl:template match="message">
    <xsl:if test="normalize-space(subject)!=''">
      <h2><xsl:value-of select="subject" /></h2>
    </xsl:if>
    <div class="date-user"><xsl:apply-templates select="date" /><p class="user"> - <xsl:value-of select="user" /></p></div>
    <xsl:apply-templates select="comment" />
   </xsl:template>

  <xsl:template match="comment">
    <xsl:apply-templates />
  </xsl:template>

</xsl:stylesheet>
