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

  1. <?xml version='1.0'?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3.                 version='1.0'>
  4.  
  5. <!-- ********************************************************************
  6.      $Id: division.xsl,v 1.1.2.1 2002/09/04 13:50:22 jdj Exp $
  7.      ********************************************************************
  8.  
  9.      This file is part of the XSL DocBook Stylesheet distribution.
  10.      See ../README or http://nwalsh.com/docbook/xsl/ for copyright
  11.      and other information.
  12.  
  13.      ******************************************************************** -->
  14.  
  15. <!-- ==================================================================== -->
  16.  
  17. <xsl:template match="set">
  18.   <div class="{name(.)}">
  19.     <xsl:if test="$generate.id.attributes != 0">
  20.       <xsl:attribute name="id">
  21.         <xsl:call-template name="object.id"/>
  22.       </xsl:attribute>
  23.     </xsl:if>
  24.  
  25.     <xsl:call-template name="set.titlepage"/>
  26.  
  27.     <xsl:call-template name="make.lots">
  28.       <xsl:with-param name="toc.params">
  29.         <xsl:call-template name="find.path.params">
  30.           <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
  31.         </xsl:call-template>
  32.       </xsl:with-param>
  33.       <xsl:with-param name="toc">
  34.         <xsl:call-template name="set.toc"/>
  35.       </xsl:with-param>
  36.     </xsl:call-template>
  37.  
  38.     <xsl:apply-templates/>
  39.   </div>
  40. </xsl:template>
  41.  
  42. <xsl:template match="set/setinfo"></xsl:template>
  43. <xsl:template match="set/title"></xsl:template>
  44. <xsl:template match="set/titleabbrev"></xsl:template>
  45. <xsl:template match="set/subtitle"></xsl:template>
  46.  
  47. <!-- ==================================================================== -->
  48.  
  49. <xsl:template match="book">
  50.   <div class="{name(.)}">
  51.     <xsl:if test="$generate.id.attributes != 0">
  52.       <xsl:attribute name="id">
  53.         <xsl:call-template name="object.id"/>
  54.       </xsl:attribute>
  55.     </xsl:if>
  56.  
  57.     <xsl:call-template name="book.titlepage"/>
  58.  
  59.     <xsl:apply-templates select="dedication" mode="dedication"/>
  60.  
  61.     <xsl:call-template name="make.lots">
  62.       <xsl:with-param name="toc.params">
  63.         <xsl:call-template name="find.path.params">
  64.           <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
  65.         </xsl:call-template>
  66.       </xsl:with-param>
  67.       <xsl:with-param name="toc">
  68.         <xsl:call-template name="division.toc"/>
  69.       </xsl:with-param>
  70.     </xsl:call-template>
  71.  
  72.     <xsl:apply-templates/>
  73.   </div>
  74. </xsl:template>
  75.  
  76. <xsl:template match="book/bookinfo"></xsl:template>
  77. <xsl:template match="book/title"></xsl:template>
  78. <xsl:template match="book/titleabbrev"></xsl:template>
  79. <xsl:template match="book/subtitle"></xsl:template>
  80.  
  81. <!-- ==================================================================== -->
  82.  
  83. <xsl:template match="part">
  84.   <div class="{name(.)}">
  85.     <xsl:if test="$generate.id.attributes != 0">
  86.       <xsl:attribute name="id">
  87.         <xsl:call-template name="object.id"/>
  88.       </xsl:attribute>
  89.     </xsl:if>
  90.  
  91.     <xsl:call-template name="part.titlepage"/>
  92.  
  93.     <xsl:variable name="toc.params">
  94.       <xsl:call-template name="find.path.params">
  95.         <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
  96.       </xsl:call-template>
  97.     </xsl:variable>
  98.     <xsl:if test="not(partintro) and contains($toc.params, 'toc')">
  99.       <xsl:call-template name="division.toc"/>
  100.     </xsl:if>
  101.     <xsl:apply-templates/>
  102.   </div>
  103. </xsl:template>
  104.  
  105. <xsl:template match="part" mode="make.part.toc">
  106.   <xsl:call-template name="division.toc"/>
  107. </xsl:template>
  108.  
  109. <xsl:template match="reference" mode="make.part.toc">
  110.   <xsl:call-template name="division.toc"/>
  111. </xsl:template>
  112.  
  113. <xsl:template match="part/docinfo"></xsl:template>
  114. <xsl:template match="part/partinfo"></xsl:template>
  115. <xsl:template match="part/title"></xsl:template>
  116. <xsl:template match="part/titleabbrev"></xsl:template>
  117. <xsl:template match="part/subtitle"></xsl:template>
  118.  
  119. <xsl:template match="partintro">
  120.   <div class="{name(.)}">
  121.     <xsl:if test="$generate.id.attributes != 0">
  122.       <xsl:attribute name="id">
  123.         <xsl:call-template name="object.id"/>
  124.       </xsl:attribute>
  125.     </xsl:if>
  126.  
  127.     <xsl:call-template name="partintro.titlepage"/>
  128.     <xsl:apply-templates/>
  129.  
  130.     <xsl:variable name="toc.params">
  131.       <xsl:call-template name="find.path.params">
  132.         <xsl:with-param name="node" select="parent::*"/>
  133.         <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
  134.       </xsl:call-template>
  135.     </xsl:variable>
  136.     <xsl:if test="contains($toc.params, 'toc')">
  137.       <!-- not ancestor::part because partintro appears in reference -->
  138.       <xsl:apply-templates select="parent::*" mode="make.part.toc"/>
  139.     </xsl:if>
  140.     <xsl:call-template name="process.footnotes"/>
  141.   </div>
  142. </xsl:template>
  143.  
  144. <xsl:template match="partintro/title"></xsl:template>
  145. <xsl:template match="partintro/titleabbrev"></xsl:template>
  146. <xsl:template match="partintro/subtitle"></xsl:template>
  147.  
  148. <xsl:template match="partintro/title" mode="partintro.title.mode">
  149.   <h2>
  150.     <xsl:apply-templates/>
  151.   </h2>
  152. </xsl:template>
  153.  
  154. <xsl:template match="partintro/subtitle" mode="partintro.title.mode">
  155.   <h3>
  156.     <i><xsl:apply-templates/></i>
  157.   </h3>
  158. </xsl:template>
  159.  
  160. <!-- ==================================================================== -->
  161.  
  162. <xsl:template match="book" mode="division.number">
  163.   <xsl:number from="set" count="book" format="1."/>
  164. </xsl:template>
  165.  
  166. <xsl:template match="part" mode="division.number">
  167.   <xsl:number from="book" count="part" format="I."/>
  168. </xsl:template>
  169.  
  170. </xsl:stylesheet>
  171.  
  172.