<?xml version="1.0" encoding="UTF-8"?>
<!-- This file defines the variables for the dynamic dropdown tables of contents.
     Note the javascript methods on <select>, which simply pass the target URL to the form.
     David Sewell, 11 October 2011
-->
<xsl:stylesheet version="2.0" exclude-result-prefixes="tei"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tei="http://www.tei-c.org/ns/1.0">

   <xsl:variable name="linearForm">
      <form action="http://rotunda.upress.virginia.edu" name="optionForm">
         <select
            onchange="this.form.action=this.options[this.selectedIndex].value; this.form.submit();">
            <option style="font-family:Times New Roman;" value="#">SELECT A TITLE</option>
            <option style="font-family:Times New Roman;" value="acknowledgements.html">Acknowledgements</option>
            <option style="font-family:Times New Roman;" value="abbreviations.html">Abbreviations and Modes of Reference</option>
            <option style="font-family:Times New Roman;" value="genIntro.html">General Introduction</option>
            <option style="font-family:Times New Roman;" value="introTextual.html">Editorial Policies and Features</option>
            <option style="font-family:Times New Roman;" value="bibliography.html">Bibliography</option>
            <option style="font-family:Times New Roman;" value="indexBiblical.html">Index of Biblical References</option>
            <option style="font-family:Times New Roman;" value="indexTemple.html">Index of <i>Temple</i> References</option>
         </select>
         <!--<input type="submit"/>-->
      </form>
   </xsl:variable>

   <xsl:template match="option" mode="options">
      <xsl:param name="URL" tunnel="yes"/>
      <xsl:copy>
         <xsl:apply-templates select="@*" mode="options"/>
         <xsl:if test="$URL = @value">
            <xsl:attribute name="selected">selected</xsl:attribute>
         </xsl:if>
         <xsl:apply-templates select="node()" mode="options"/>
      </xsl:copy>
   </xsl:template>

   <xsl:template match="node() | @*" mode="options">
      <xsl:copy>
         <xsl:apply-templates select="node() | @*" mode="options"/>
      </xsl:copy>
   </xsl:template>


</xsl:stylesheet>
