<?xml version="1.0"?>
<!--
$Id: tr-count.xsl,v 1.6 2006/01/05 20:34:16 matthieu Exp $
-->
<?xml-stylesheet href="http://www.w3.org/StyleSheets/base.css" type="text/css"?>
<?xml-stylesheet href="http://www.w3.org/2002/02/style-xsl.css" type="text/css"?>
<!DOCTYPE xsl:stylesheet [
  <!ENTITY rdfuri "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <!ENTITY recuri "http://www.w3.org/2001/02pd/rec54#">
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
  xmlns:rec="&recuri;"
  xmlns:contact="http://www.w3.org/2000/10/swap/pim/contact#"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:doc="http://www.w3.org/2000/10/swap/pim/doc#"
  xmlns:rdf="&rdfuri;"
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:date="http://www.w3.org/2001/08/date-util.xslt"
  exclude-result-prefixes="date rdf rec contact dc doc">
  <xsl:import href="../../../2001/08/date-util.xslt" />

  <xsl:output method="xml" indent='yes' doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>

  <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
      <title>Stylesheet to compute numbers of current TR publications</title>
    </head>
    <body>
      <div class='head'><a href="/"><img src='/Icons/w3c_home' alt='W3C'/></a> <a href="./"><acronym title="Technical Reports">TR</acronym> Automation</a></div>

      <h1>Stylesheet to compute number of current <acronym title="Technical Reports">TR</acronym> publications</h1>
      
      <h2>Abstrat and Status</h2>
      <p>This stylesheet relies on the <a href="tr.rdf">RDF data of <acronym title="Technical Reports">TR</acronym> publications</a> maintained in the <a href="./"><acronym title="Technical Reports">TR</acronym> automation project</a>.</p>
      <p>It is developped as part of the <a href="./"><acronym title="Technical Reports">TR</acronym> automation project</a> and might later get a better integration in the whole <acronym title="Technical Reports">TR</acronym> publication process.</p>
      
      <h2>Statistics</h2>
      <form action="http://www.w3.org/2000/06/webdata/xslt" method="GET">
        <div>
          <input type="hidden" name="xslfile" value="http://www.w3.org/2002/01/tr-automation/tr-count.xsl"/>
          <input type="hidden" name="xmlfile" value="http://www.w3.org/2002/01/tr-automation/tr.rdf"/>
          <p><input type="submit" /></p>
          
        </div>
      </form>
      <address><a href="http://www.w3.org/People/Dom/">Dominique Hazael-Massieux</a> - $Id: tr-count.xsl,v 1.6 2006/01/05 20:34:16 matthieu Exp $</address>
    </body>
  </html>

  <xsl:template match="/">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
      <title>Stylesheet to compute numbers of current TR publications</title>
      <link rel="stylesheet" href="http://www.w3.org/StyleSheets/base"/>
    </head>
    <body>
      <div class='head'><a href="/"><img src='/Icons/w3c_home' alt='W3C'/></a> <a href="/2002/01/tr-automation/"><acronym title="Technical Reports">TR</acronym> Automation</a></div>

      <h1>Stylesheet to compute number of current <acronym title="Technical Reports">TR</acronym> publications</h1>
      
      <h2>Abstrat and Status</h2>
      <p>This stylesheet relies on the <a href="tr.rdf">RDF data of <acronym title="Technical Reports">TR</acronym> publications</a> maintained in the <a href="./"><acronym title="Technical Reports">TR</acronym> automation project</a>.</p>
      <p>It is developped as part of the <a href="./"><acronym title="Technical Reports">TR</acronym> automation project</a> and might later get a better integration in the whole <acronym title="Technical Reports">TR</acronym> publication process.</p>
      
      <h2>Statistics</h2>
        <dl>
          <dt>Recommendations</dt>
          <xsl:call-template name="statByStatus">
            <xsl:with-param name="status" select="'REC'"/>
          </xsl:call-template>
          <dt>Proposed Recommendations</dt>
          <xsl:call-template name="statByStatus">
            <xsl:with-param name="status" select="'PR'"/>
          </xsl:call-template>
          <dt>Proposed Edited Recommendations</dt>
          <xsl:call-template name="statByStatus">
            <xsl:with-param name="status" select="'PER'"/>
          </xsl:call-template>
          <dt>Candidate Recommendations</dt>
          <xsl:call-template name="statByStatus">
            <xsl:with-param name="status" select="'CR'"/>
          </xsl:call-template>
          <dt>Last Call</dt>
          <xsl:call-template name="statByStatus">
            <xsl:with-param name="status" select="'LastCall'"/>
          </xsl:call-template>
          <dt>Working Drafts in development</dt>
          <xsl:call-template name="statByStatus">
            <xsl:with-param name="status" select="'WD'"/>
          </xsl:call-template>
          <dt>Working Drafts no longer in development</dt>
          <xsl:call-template name="statByStatus">
            <xsl:with-param name="status" select="'Retired'"/>
          </xsl:call-template>
          <dt>Notes</dt>
          <xsl:call-template name="statByStatus">
            <xsl:with-param name="status" select="'NOTE'"/>
          </xsl:call-template>
        </dl>
        <hr/>
        <address><a href="http://www.w3.org/People/Dom/">Dominique Hazael-Massieux</a> - generated by $Id: tr-count.xsl,v 1.6 2006/01/05 20:34:16 matthieu Exp $</address>
      </body>
    </html>
    
  </xsl:template>

  <xsl:template name="statByStatus">
    <xsl:param name="status"/>
    <dd>
      <xsl:value-of select="count(/rdf:RDF/*[(local-name()=$status and namespace-uri()='&recuri;') or (rdf:type[@rdf:resource=concat('&recuri;',$status)])][($status!='REC' or not(rdf:type[@rdf:resource=concat('&recuri;','FirstEdition')] or local-name()='FirstEdition')) and ($status!='WD' or not(rdf:type[@rdf:resource=concat('&recuri;','LastCall')] or local-name()='LastCall')) and not( rdf:type[@rdf:resource=concat('&recuri;','Retired')] or local-name()='Retired' or rdf:type[@rdf:resource=concat('&recuri;','Superseded')] or local-name()='Superseded')])"/>
    </dd>
  </xsl:template>

</xsl:stylesheet>