<?xml version="1.0" ?>
<!-- Style sheet generating the chronologically ordered list -->
<!-- To learn about this file, visit:
		http://larve.net/people/hugo/2000/10/concerts/generation    -->
<!-- $Id: date-20001020.xsl 3064 2007-05-19 16:50:33Z larve $ -->
<!-- Copyright (c) 2000 Hugo Haas <hugo@larve.net> -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
                xmlns="http://www.w3.org/1999/xhtml">
<xsl:import href="format-concert-20001020.xsl"/>
<xsl:import href="header-footer.xsl"/>

<xsl:output
   method="xml"
   encoding="us-ascii"
   omit-xml-declaration="yes"
   doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" 
   doctype-system="http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.dtd"
   indent="yes"
   />


<xsl:template match="concerts">
  <html lang="en" xml:lang="en">
    <xsl:call-template name="head">
      <xsl:with-param name="what" select="'concert date'" />
    </xsl:call-template>
  <body>
    <h2>Concert Reviews: by date</h2>
    <xsl:call-template name="header"/>
      <h2>Reviews and Photos</h2>
      <p>Shortcuts:
      <xsl:for-each select="concert/date/year[not(. = following::year)]">
        <xsl:sort data-type="number" order="ascending"/>
	<xsl:variable name="y" select="concat('y', .)"/>
        <a href="#{$y}"><xsl:value-of select="."/></a>
	<xsl:text>, </xsl:text>
      </xsl:for-each>
      <a href="#others">others</a>.</p>
      <xsl:for-each select="concert/date/year[not(. = following::year)]">
        <xsl:sort data-type="number" order="descending"/>
	<xsl:variable name="y" select="concat('y', .)"/>
        <h3 id="{$y}"><xsl:value-of select="."/></h3>
	<xsl:choose>
        <xsl:when test="count(//concerts/concert[attribute::status='seen'
				and .//date/year=current()])>0">
        <ul>
        <xsl:for-each
	   select="//concerts/concert[attribute::status='seen'
	                              and .//date/year=current()]">
	  <xsl:sort select="date/month" data-type="number" order="descending"/>
	  <xsl:sort select="date/day" data-type="number" order="descending"/>
	  <li>
	    <xsl:call-template name="concert-entry"/>
	  </li>
	</xsl:for-each>
        </ul>
        </xsl:when>
	<xsl:otherwise>
	<p>None yet.</p>
	</xsl:otherwise>
	</xsl:choose>
      </xsl:for-each>
    <h2 id="others">Upcoming Concert</h2>
    <xsl:if test="count(concert[attribute::status='upcoming'])>0">
    <ul>
      <xsl:for-each select="concert[attribute::status='upcoming']">
        <xsl:sort select="date/year" data-type="number" order="ascending"/>
        <xsl:sort select="date/month" data-type="number" order="ascending"/>
        <xsl:sort select="date/day" data-type="number" order="ascending"/>
        <li>
          <xsl:call-template name="concert-entry"/>
        </li>
      </xsl:for-each>
    </ul>
    </xsl:if>
    <p>See also my <a href='../../../2003/01/upcomingconcerts'>upcoming concerts page</a>.</p>
    <!--
    <h2>Maybe</h2>
    <xsl:if test="count(concert[attribute::status='maybe'])>0">
    <ul>
      <xsl:for-each select="concert[attribute::status='maybe']">
        <xsl:sort select="date/year" data-type="number" order="ascending"/>
        <xsl:sort select="date/month" data-type="number" order="ascending"/>
        <xsl:sort select="date/day" data-type="number" order="ascending"/>
        <li>
          <xsl:call-template name="concert-entry"/>
        </li>
      </xsl:for-each>
    </ul>
    </xsl:if>
    -->
  <xsl:call-template name="footer"/>
  </body>
  </html>
</xsl:template>

</xsl:stylesheet>
