<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
		xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                exclude-result-prefixes="#default">

  <!-- =============================================================== -->   
  <!-- nyhet.xsl (v001 ) -                                              -->
  <!-- opprettet 15.11.04 - even.halvorsen@usit.uio.no                 -->
  <!-- =============================================================== -->

  <xsl:import href="../../../system/api-v001.xsl" />
  <xsl:import href="../../../felles/komponenter/dato/v001/dato.xsl"/>
  <xsl:import href="../../../felles/komponenter/overskrift/v002/overskrift.xsl" />
  <xsl:import href="../../../felles/komponenter/fritekst/v002/fritekst.xsl" />
  <xsl:import href="../../../felles/komponenter/bilde/v002/bilde.xsl" />
  <xsl:import href="../../komponenter/profil/v001/profil.xsl" />  
  <xsl:include href="../../../felles/ressurser/breadcrumb-v001.xsl" />
  <xsl:include href="../../ressurser/output-method-html-v001.xsl" />
  


  <!-- xsl:template match="/" inkluderes av profil-v001.xsl -->
  <xsl:template name="doc-metadata">
    <meta name="keywords" content="Arena, news, nyhet, {//topp/tittel}" />
    <meta name="description" content="{//topp/ingress/fritekst/avsnitt[1]}" />
  </xsl:template>

  <xsl:template match="nyhet">
    <xsl:choose>
      <xsl:when test="//spraak='norsk'">
        <div id="brodsmule">Du er her: <xsl:call-template name="breadcrumb" /></div>    
      </xsl:when>
      <xsl:otherwise>
        <div id="brodsmule">You are here: <xsl:call-template name="breadcrumb" /></div>    
      </xsl:otherwise>
    </xsl:choose>
    
    <xsl:apply-templates /> 
  </xsl:template>
    
  <xsl:template match="spraak" />

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

  <xsl:template match="tittel">
    <xsl:if test="not(.='')">
      <h1><xsl:value-of select="." /></h1>
    </xsl:if>
  </xsl:template>

  <xsl:template match="ingress">
    <xsl:if test="not(normalize-space(.)='')">
      <div class="ingress">
        <xsl:apply-templates select="bilde"/>
        <xsl:apply-templates select="fritekst"/>
      </div>  
    </xsl:if>
  </xsl:template> 

  <xsl:template match="ingress/bilde">
    <img src="{.}" alt="ingressbilde" />
  </xsl:template>

  <!-- templater for dato, overskrift, bilde og fritekst importeres -->

</xsl:stylesheet>
