<?xml version="1.0" encoding="utf-8"?>

<!--  covered by the W3C copyright policy http://www.w3.org/Consortium/Copyright -->
<!--  based on http://www.w3.org/WAI/AU/sources/toc.xsl -->

<!--  This is for generating the Authoring Tool Accessibility Guidelines -->
<!--  For more information on the way this is done see heetp://www.w3.org/WAI/AU/sources -->


<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:html="http://www.w3.org/1999/xhtml"
  xmlns="http://www.w3.org/1999/xhtml"
  exclude-result-prefixes="#default"
  version="1.0">

  <!-- import the variable declarations... -->
  <xsl:import href="tex-av-make.xsl"/>

  <!-- by default, copy everything verbatim -->
  <xsl:template match="@*|node()"> 
    <xsl:copy> 
      <xsl:apply-templates select="@*|node()"/> 
    </xsl:copy> 
  </xsl:template>

  <!-- put the right stuff in the header -->
  <xsl:template match="html:head">
    <head>
    <title>Techniques for Authoring Tool Accessibility <xsl:value-of select="$subVersion"/></title>
    <link rel="meta" href="metadata.rdf" />
    <link rel="style" href="$styleSheet" />
    </head>
  </xsl:template>

  <!-- put in the title, status and version information -->
  <xsl:template match="html:p[@id='titleStatus']">
    <h1 class="notoc">Techniques for Authoring Tool Accessibility <xsl:value-of select="$subVersion"/></h1>
    <h2 class="notoc">Working Draft <xsl:value-of select="$draftDate"/></h2>
    <dl>
      <dt>This Version:</dt>
      <dd><a href="{$thisVersion}"><xsl:value-of select="$thisVersion"/></a></dd>
    </dl>
    <h2>Warning. This is a test document</h2>
    <p>This document has been generated as a test
    for an XSLT stylesheet, and does not represent anything much.</p>
  </xsl:template>

  <!-- remove anything that is guidelines-specific, or source-doc specific -->
  <xsl:template match="*[@class='source']"/>
  <xsl:template match="*[@class='guidelines']"/>
  <xsl:template match="*[starts-with(@class,'tex')][not(contains(@class,'-av'))][not(contains(@class,'-all'))]"/>

  <!-- include the stylesheet for generating the table of contents -->
  <xsl:include href="toc.xsl"/>
 
</xsl:stylesheet>

