dirkv       02/01/03 13:37:55

  Modified:    src/doc/stylesheets slide.xsl
  Log:
  index/split subsections
  
  Revision  Changes    Path
  1.5       +47 -2     jakarta-slide/src/doc/stylesheets/slide.xsl
  
  Index: slide.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/doc/stylesheets/slide.xsl,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- slide.xsl 24 Sep 2001 21:59:43 -0000      1.4
  +++ slide.xsl 3 Jan 2002 21:37:54 -0000       1.5
  @@ -1,6 +1,6 @@
   <?xml version="1.0" encoding="ISO-8859-1"?>
   <!-- Temporary Stylesheet for Catalina Developer Documentation -->
  -<!-- $Id: slide.xsl,v 1.4 2001/09/24 21:59:43 cmlenz Exp $ -->
  +<!-- $Id: slide.xsl,v 1.5 2002/01/03 21:37:54 dirkv Exp $ -->
   
   <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
     version="1.0">
  @@ -157,11 +157,42 @@
         </td></tr>
         <!-- Section body -->
         <tr><td><blockquote>
  -        <xsl:apply-templates/>
  +        <xsl:if test="not(@split-subsections)">
  +          <xsl:apply-templates/>
  +        </xsl:if>
  +        <xsl:if test="@split-subsections">
  +          <xsl:apply-templates select="p" />
  +          <xsl:call-template name="split-subsections" />
  +        </xsl:if>
         </blockquote></td></tr>
       </table>
     </xsl:template>
   
  +  <!-- display subsection in 2 columns -->
  +  <xsl:template name="split-subsections">
  +    <xsl:variable name="middle">
  +      <xsl:value-of select="ceiling((count(subsection) div 2))"/>
  +    </xsl:variable>
  +
  +    <table width="100%"><tr><td valign="top" width="45%">
  +
  +    <xsl:for-each select="subsection">
  +      <xsl:if test="position() &lt;= $middle">
  +        <xsl:apply-templates select="." />
  +      </xsl:if>
  +    </xsl:for-each>
  +
  +    </td><td valign="top" width="10%">&#160;</td><td valign="top" width="*">
  +
  +    <xsl:for-each select="subsection">
  +      <xsl:if test="position() &gt; $middle">
  +        <xsl:apply-templates select="." />
  +      </xsl:if>
  +    </xsl:for-each>
  +
  +    </td></tr></table>
  +
  +  </xsl:template>
   
     <!-- Process a documentation subsection -->
     <xsl:template match="subsection">
  @@ -180,6 +211,20 @@
           <xsl:apply-templates/>
         </blockquote></td></tr>
       </table>
  +  </xsl:template>
  +
  +  <!-- create an index of the subsections of the current section -->
  +  <xsl:template match="section/subsection-index">
  +    <table><th><td><xsl:value-of select="@title" /></td></th>
  +    <tr><td>
  +    <ul>
  +    <xsl:for-each select="../subsection">
  +      <li>
  +          <a><xsl:attribute name="href">#<xsl:value-of select="@name" 
/></xsl:attribute><xsl:value-of select="@name" /></a>
  +      </li>  
  +    </xsl:for-each>
  +    </ul>
  +    </td></tr></table><br/>
     </xsl:template>
   
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to