home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2003 October / INTERNET108.ISO / pc / software / windows / building / xmlspy / xmlspyentcomplete5.exe / Data1.cab / _1B8AB7BE80F64D8B9AC4A823E35CE68C < prev    next >
Encoding:
Extensible Markup Language  |  2002-09-04  |  5.7 KB  |  174 lines

  1. <?xml version="1.0" encoding="US-ASCII"?>
  2. <!--This file was created automatically by html2xhtml-->
  3. <!--from the HTML stylesheets. Do not edit this file.-->
  4. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  5.  
  6. <!-- ********************************************************************
  7.      $Id: index.xsl,v 1.1.2.3 2002/09/04 13:55:40 jdj Exp $
  8.      ********************************************************************
  9.  
  10.      This file is part of the XSL DocBook Stylesheet distribution.
  11.      See ../README or http://nwalsh.com/docbook/xsl/ for copyright
  12.      and other information.
  13.  
  14.      ******************************************************************** -->
  15.  
  16. <!-- ==================================================================== -->
  17.  
  18. <xsl:template match="index|setindex">
  19.   <!-- some implementations use completely empty index tags to indicate -->
  20.   <!-- where an automatically generated index should be inserted. so -->
  21.   <!-- if the index is completely empty, skip it. Unless generate.index -->
  22.   <!-- is non-zero, in which case, this is where the automatically -->
  23.   <!-- generated index should go. -->
  24.  
  25.   <xsl:if test="count(*)>0 or $generate.index != '0'">
  26.     <div xmlns="http://www.w3.org/1999/xhtml" class="{name(.)}">
  27.       <xsl:if test="$generate.id.attributes != 0">
  28.         <xsl:attribute name="id">
  29.           <xsl:call-template name="object.id"/>
  30.         </xsl:attribute>
  31.       </xsl:if>
  32.  
  33.       <xsl:call-template name="anchor"/>
  34.       <xsl:call-template name="index.titlepage"/>
  35.       <xsl:apply-templates/>
  36.  
  37.       <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0">
  38.         <xsl:call-template name="generate-index"/>
  39.       </xsl:if>
  40.  
  41.       <xsl:call-template name="process.footnotes"/>
  42.     </div>
  43.   </xsl:if>
  44. </xsl:template>
  45.  
  46. <xsl:template match="index/title"/>
  47. <xsl:template match="index/subtitle"/>
  48. <xsl:template match="index/titleabbrev"/>
  49.  
  50. <xsl:template match="index/title" mode="component.title.mode">
  51.   <h2 xmlns="http://www.w3.org/1999/xhtml" class="title">
  52.     <xsl:apply-templates/>
  53.   </h2>
  54. </xsl:template>
  55.  
  56. <xsl:template match="index/subtitle" mode="component.title.mode">
  57.   <h3 xmlns="http://www.w3.org/1999/xhtml">
  58.     <i><xsl:apply-templates/></i>
  59.   </h3>
  60. </xsl:template>
  61.  
  62. <!-- ==================================================================== -->
  63.  
  64. <xsl:template match="indexdiv">
  65.   <div xmlns="http://www.w3.org/1999/xhtml" class="{name(.)}">
  66.     <xsl:if test="$generate.id.attributes != 0">
  67.       <xsl:attribute name="id">
  68.         <xsl:call-template name="object.id"/>
  69.       </xsl:attribute>
  70.     </xsl:if>
  71.  
  72.     <xsl:call-template name="anchor"/>
  73.     <xsl:apply-templates mode="not-indexentrys"/>
  74.     <dl>
  75.       <xsl:apply-templates select="indexentry"/>
  76.     </dl>
  77.   </div>
  78. </xsl:template>
  79.  
  80. <xsl:template match="indexentry" mode="not-indexentrys">
  81.   <!-- suppress -->
  82. </xsl:template>
  83.  
  84. <xsl:template match="indexdiv/title">
  85.   <h3 xmlns="http://www.w3.org/1999/xhtml" class="{name(.)}">
  86.     <xsl:apply-templates/>
  87.   </h3>
  88. </xsl:template>
  89.  
  90. <!-- ==================================================================== -->
  91.  
  92. <xsl:template match="indexterm">
  93.   <!-- this one must have a name, even if it doesn't have an ID -->
  94.   <xsl:variable name="id">
  95.     <xsl:call-template name="object.id"/>
  96.   </xsl:variable>
  97.  
  98.   <a xmlns="http://www.w3.org/1999/xhtml" id="{$id}" class="indexterm"/>
  99. </xsl:template>
  100.  
  101. <xsl:template match="primary|secondary|tertiary|see|seealso">
  102. </xsl:template>
  103.  
  104. <!-- ==================================================================== -->
  105.  
  106. <xsl:template match="indexentry">
  107.   <xsl:apply-templates select="primaryie"/>
  108. </xsl:template>
  109.  
  110. <xsl:template match="primaryie">
  111.   <dt xmlns="http://www.w3.org/1999/xhtml">
  112.     <xsl:apply-templates/>
  113.   </dt>
  114.   <xsl:choose>
  115.     <xsl:when test="following-sibling::secondaryie">
  116.       <dd xmlns="http://www.w3.org/1999/xhtml">
  117.         <dl>
  118.           <xsl:apply-templates select="following-sibling::secondaryie"/>
  119.         </dl>
  120.       </dd>
  121.     </xsl:when>
  122.     <xsl:when test="following-sibling::seeie                     |following-sibling::seealsoie">
  123.       <dd xmlns="http://www.w3.org/1999/xhtml">
  124.         <dl>
  125.           <xsl:apply-templates select="following-sibling::seeie                                        |following-sibling::seealsoie"/>
  126.         </dl>
  127.       </dd>
  128.     </xsl:when>
  129.   </xsl:choose>
  130. </xsl:template>
  131.  
  132. <xsl:template match="secondaryie">
  133.   <dt xmlns="http://www.w3.org/1999/xhtml">
  134.     <xsl:apply-templates/>
  135.   </dt>
  136.   <xsl:choose>
  137.     <xsl:when test="following-sibling::tertiaryie">
  138.       <dd xmlns="http://www.w3.org/1999/xhtml">
  139.         <dl>
  140.           <xsl:apply-templates select="following-sibling::tertiaryie"/>
  141.         </dl>
  142.       </dd>
  143.     </xsl:when>
  144.     <xsl:when test="following-sibling::seeie                     |following-sibling::seealsoie">
  145.       <dd xmlns="http://www.w3.org/1999/xhtml">
  146.         <dl>
  147.           <xsl:apply-templates select="following-sibling::seeie                                        |following-sibling::seealsoie"/>
  148.         </dl>
  149.       </dd>
  150.     </xsl:when>
  151.   </xsl:choose>
  152. </xsl:template>
  153.  
  154. <xsl:template match="tertiaryie">
  155.   <dt xmlns="http://www.w3.org/1999/xhtml">
  156.     <xsl:apply-templates/>
  157.   </dt>
  158.   <xsl:if test="following-sibling::seeie                 |following-sibling::seealsoie">
  159.     <dd xmlns="http://www.w3.org/1999/xhtml">
  160.       <dl>
  161.         <xsl:apply-templates select="following-sibling::seeie                                      |following-sibling::seealsoie"/>
  162.       </dl>
  163.     </dd>
  164.   </xsl:if>
  165. </xsl:template>
  166.  
  167. <xsl:template match="seeie|seealsoie">
  168.   <dt xmlns="http://www.w3.org/1999/xhtml">
  169.     <xsl:apply-templates/>
  170.   </dt>
  171. </xsl:template>
  172.  
  173. </xsl:stylesheet>
  174.