<?xml version="1.0"?>
<golum:dao title="Recent Press" htmlHeader="/style/x960header.fhtml" htmlFooter="/style/x960footer.fhtml" xmlns:golum="http://www.geobacter.org/2003/XML/DAO" version="1.0">
<golum:dbaccess>
<golum:query name="presstypes" dateFormat="yyyy-MM-dd" groupLevels="1">
      select press_categories.category, press.pubdate, press.publication, press.puburl, press.title, url,
      press_types.file_extension, press_types.icon 
      from press inner join press_types on
      press.type=press_types.id
      inner join press_categories on
      press_types.category=press_categories.id
      order by press_categories.sort, pubdate desc
</golum:query>
</golum:dbaccess>

<!-- style sheet for press publications...woohoo!!! -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" indent="yes" omit-xml-declaration="yes" version="4.0"/>
<xsl:template match="/result/presstypes">

<div class="grid_12">
<p><span class="heading">Recent Press</span> <span class="recent"> [sorted by type | <a href="date.xml">sorted by date</a>]</span></p>
<table class="geobacter">
  <tr> 
    <th>Date</th>
    <th>Title</th>
    <th>Publication</th>
  </tr>
  <xsl:apply-templates/>
</table>
</div>
<div class="clear"></div>
</xsl:template>

<xsl:template match="group">
  <tr> 
    <th colspan="3"><xsl:value-of select="@category" disable-output-escaping="yes" /></th>
  </tr>
  <xsl:apply-templates/>
</xsl:template>
<xsl:template match="entry">
  <tr> 
    <td><xsl:value-of select="pubdate" disable-output-escaping="yes"/></td>
    <td class="normal">
      <xsl:element name="a">
        <xsl:attribute name="href">
           <xsl:value-of select="url"/>
        </xsl:attribute>
       <xsl:value-of select="title" disable-output-escaping="yes"/>
       </xsl:element>
    </td>
    <td>
      <xsl:element name="a">
        <xsl:attribute name="href">
           <xsl:value-of select="puburl"/>
        </xsl:attribute>
        <xsl:value-of select="publication" disable-output-escaping="yes"/>
      </xsl:element>
    </td>
  </tr>
</xsl:template>
</xsl:stylesheet>
</golum:dao>

