<?xml version="1.0"?>
<xsl:stylesheet
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:n="http://joachim-breitner.de/2004/Website/News"
  version="1.0"
>

<!-- This file is © 2004 Joachim Breitner. All Rights Reserved, but feel free to ask for a Free Licence (MIT, GPL): mail@joachim-breitner.de -->

<!--
<xsl:output method="xml"
  media-type="text/html"
  doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
  doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
/>
-->

<xsl:template match="n:news">
 <table class="news">
  <xsl:apply-templates/>
 </table>
  <!-- xsl:apply-templates select="document(@href)"/ -->
</xsl:template>

<xsl:template match="n:entry">
  <!-- div style="position:relative; width:500px; padding:27px 0px 4px 208px; margin-bottom:10px;">

   <div style="position:absolute; left:0px; top:0px; width:200px; text-align:right;
   	       margin:0px 1px 0px 1px; border-bottom:1px solid black; border-right:1px solid black;
	       height:20px; vertical-align:middle;padding:1px">
    <xsl:value-of select="@date"/>
   </div>
   <div style="position:absolute; left:207px; top:0px; font-size:large;font-weight:bold;
               margin:0px 0px 1px 1px; border-bottom:1px solid black; border-left:1px solid black;
	       height:20px; right:0px; vertical-align:middle; padding:1px">
    <xsl:value-of select="title"/>
   </div>
   <!- div style="position:absolute; left:0px; top:26px; width:200px; bottom:3px; margin:1px;
               border-top:1px solid black; border-right:1px solid black; padding:1px">
   <span/>
   </div - > 
   <xsl:apply-templates />

  </div -->
  <tr style="height:20px">
   <td style="width:200px; text-align:right;border-bottom:1px solid black; border-right:1px solid black; 
	       vertical-align:middle;padding:1px">
    <xsl:value-of select="@date"/>
   </td>
   <td style="text-align:left;border-bottom:1px solid black; border-left:1px solid black; 
   vertical-align:middle;padding:1px; font-size:large; font-weight:bold">
    <xsl:value-of select="n:title"/>
   </td>
   </tr>
   <tr>
   <td style="text-align:right;vertical-align:top;padding:10px;">
   <xsl:if test="../n:topic[@name=current()/@topic]">
   <img>
    <xsl:attribute name="src">
     <xsl:value-of select="../n:topic[@name=current()/@topic]/@image"/>
    </xsl:attribute>
    <xsl:attribute name="alt">
     <xsl:value-of select="../n:topic[@name=current()/@topic]/n:title"/>
    </xsl:attribute>
    <xsl:attribute name="title">
     <xsl:value-of select="../n:topic[@name=current()/@topic]/n:title"/>
    </xsl:attribute>
   </img>
   </xsl:if>
   </td>
   <!-- div style="position:absolute; left:0px; top:26px; width:200px; bottom:3px; margin:1px;
               border-top:1px solid black; border-right:1px solid black; padding:1px">
   <span/>
   </div --> 
   <td style="text-align:justify;border-top:1px solid black; border-left:1px solid black;
              height:20px; vertical-align:middle; padding:1px; margin-bottom:10px ">
   <xsl:apply-templates />
   </td>
   </tr>
</xsl:template>

<xsl:template match="n:news/n:topic"/>
<xsl:template match="n:entry/n:title"/>

<xsl:template match="n:entry/n:content">
  <xsl:apply-templates/>
</xsl:template>

</xsl:stylesheet>
