<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:html="http://www.w3.org/1999/xhtml" exclude-result-prefixes="date str html rdf rdfs ical" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:ical='http://www.w3.org/2002/12/cal/ical#' xmlns:date="http://www.w3.org/2001/08/date-util.xslt" xmlns:str="http://www.w3.org/2001/10/str-util.xsl">
  <xsl:import href="http://www.w3.org/2001/10/str-util.xsl"/>
  <xsl:import href="http://www.w3.org/2001/08/date-util.xslt"/>
<xsl:output 
  doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
  doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" encoding="iso-8859-1" method="xml" indent="yes"/>

<xsl:template match="/">
  <html>
    <head>
      <title>Dom's current and past projects</title>
      <link rel="Stylesheet" href="style.css" type="text/css"/>
      <link type="text/css" rel="stylesheet" href="/StyleSheets/team"/>
    </head>
    <body>
      <p><a href="/" title="W3C"><img height="48" width="72" alt="W3C"
      src="http://www.w3.org/Icons/w3c_home" /></a> - <a href="./">Dom's Team page</a></p>
      <h1>Dom's current and past projects</h1>
      <h2>Abstract and status</h2>
      <p>This is a list of projects I'm currently working on (or I've been working on for past references). I'll try to keep it up to date (this page is generated), but if the last modification date ($Date: 2005/12/14 15:10:02 $) is old, there are good changes it's not.</p>

      <h2>Planned</h2>
      <dl>
        <xsl:apply-templates select="/rdf:RDF//ical:Vtodo[not(ical:status) and ical:priority&lt;6]">
          <xsl:sort select="ical:priority"/>
        </xsl:apply-templates>
      </dl>

      <h2>Current projects</h2>
      <dl>
        <xsl:apply-templates select="/rdf:RDF//ical:Vtodo[(ical:status='NEEDS-ACTION' or ical:status='IN-PROCESS') and not(ical:class/@rdf:resource='http://www.w3.org/2002/12/cal/ical#private') and ical:priority&lt;6]">
          <xsl:sort select="ical:priority"/>
        </xsl:apply-templates>
      </dl>
      <p>Started, but low priority:</p>
      <dl>
        <xsl:apply-templates select="/rdf:RDF//ical:Vtodo[(ical:status='NEEDS-ACTION' or ical:status='IN-PROCESS') and not(ical:class/@rdf:resource='http://www.w3.org/2002/12/cal/ical#private') and ical:priority&gt;=6]">
          <xsl:sort select="ical:priority"/>
        </xsl:apply-templates>
      </dl>

      <h2>Someday pile</h2>
      <dl>
        <xsl:apply-templates select="/rdf:RDF//ical:Vtodo[not(ical:status) and not(ical:class/@rdf:resource='http://www.w3.org/2002/12/cal/ical#private') and ical:priority&gt;=6]">
          <xsl:sort select="ical:priority"/>
        </xsl:apply-templates>
      </dl>

      <h2>Past projects</h2>
      <dl>
        <xsl:apply-templates select="/rdf:RDF//ical:Vtodo[(ical:status='CANCELLED' or ical:status='COMPLETED') and not(ical:class/@rdf:resource='http://www.w3.org/2002/12/cal/ical#private')]">
          <xsl:sort select="ical:completed" order="descending"/>
        </xsl:apply-templates>
      </dl>
      <hr/>
      <address><a href="./">Dominique Haza&#235;l-Massieux</a> &lt;<a
      href="mailto:dom@w3.org">dom@w3.org</a>&gt;<br />
      Last Modified: $Date: 2005/12/14 15:10:02 $</address>
    </body>
  </html>
</xsl:template>

<xsl:template match="ical:Vtodo">
  <dt>
    <xsl:choose>
      <xsl:when test="ical:url">
        <a href="{ical:url/@rdf:resource}"><xsl:value-of select="ical:summary"/></a>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="ical:summary"/>        
      </xsl:otherwise>
    </xsl:choose>
  </dt>
  <dd><xsl:value-of select="ical:description"/></dd>
  <xsl:if test="ical:status='CANCELLED' or ical:status='COMPLETED'">
    <dd><xsl:value-of select="translate(ical:status,$str:uc,$str:lc)"/> on <xsl:call-template name="date:makeDateFriendly"><xsl:with-param name="date" select="substring(ical:completed,1,8)"/></xsl:call-template></dd>    
  </xsl:if>
</xsl:template>

</xsl:stylesheet>