]> granicus.if.org Git - docbook-dsssl/commitdiff
Pass prev/next around as parameters so that different navigation strategies can be...
authorNorman Walsh <ndw@nwalsh.com>
Fri, 11 May 2001 13:47:14 +0000 (13:47 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Fri, 11 May 2001 13:47:14 +0000 (13:47 +0000)
slides/xsl/frames.xsl
slides/xsl/slides.xsl

index e70285e2bd65dc4c751b282fae2fd258647909f3..006f48b51b2cf279c48ef7e731e2b93df27a5efc 100644 (file)
@@ -381,7 +381,10 @@ if (selectBrowser() == "ie5") {
           </xsl:if>
         </head>
         <body class="navigation">
-          <xsl:call-template name="section-top-nav"/>
+          <xsl:call-template name="section-top-nav">
+            <xsl:with-param name="prev-target" select="'foil'"/>
+            <xsl:with-param name="next-target" select="'foil'"/>
+          </xsl:call-template>
         </body>
       </html>
     </xsl:with-param>
@@ -734,7 +737,10 @@ if (selectBrowser() == "ie5") {
           </xsl:if>
         </head>
         <body class="navigation">
-          <xsl:call-template name="foil-top-nav"/>
+          <xsl:call-template name="foil-top-nav">
+            <xsl:with-param name="prev-target" select="'foil'"/>
+            <xsl:with-param name="next-target" select="'foil'"/>
+          </xsl:call-template>
         </body>
       </html>
     </xsl:with-param>
index 6930c5a0b588faf22be34351292e3a50509e8e9c..19c5d6f62571d8e0de11fc42d488d9a9ed8d3f90 100644 (file)
 <!-- ============================================================ -->
 
 <xsl:template name="section-top-nav">
+  <xsl:param name="prev-target" select="''"/>
+  <xsl:param name="next-target" select="''"/>
+
   <xsl:variable name="nextfoil">
     <xsl:apply-templates select="foil[1]" mode="filename"/>
   </xsl:variable>
           <xsl:choose>
             <xsl:when test="$prevfoil != ''">
               <a href="{$prevfoil}">
+                <xsl:if test="$prev-target != ''">
+                  <xsl:attribute name="target">
+                    <xsl:value-of select="$prev-target"/>
+                  </xsl:attribute>
+                </xsl:if>
                 <img alt="Prev" border="0">
                   <xsl:attribute name="src">
                     <xsl:call-template name="graphics.dir"/>
           <xsl:choose>
             <xsl:when test="$nextfoil != ''">
               <a href="{$nextfoil}">
+                <xsl:if test="$next-target != ''">
+                  <xsl:attribute name="target">
+                    <xsl:value-of select="$next-target"/>
+                  </xsl:attribute>
+                </xsl:if>
                 <img alt="Next" border="0">
                   <xsl:attribute name="src">
                     <xsl:call-template name="graphics.dir"/>
 </xsl:template>
 
 <xsl:template name="foil-top-nav">
+  <xsl:param name="prev-target" select="''"/>
+  <xsl:param name="next-target" select="''"/>
+
   <xsl:variable name="section" select="ancestor::section"/>
 
   <xsl:variable name="nextfoil">
           <xsl:choose>
             <xsl:when test="$prevfoil != ''">
               <a href="{$prevfoil}">
+                <xsl:if test="$prev-target != ''">
+                  <xsl:attribute name="target">
+                    <xsl:value-of select="$prev-target"/>
+                  </xsl:attribute>
+                </xsl:if>
                 <img alt="Prev" border="0">
                   <xsl:attribute name="src">
                     <xsl:call-template name="graphics.dir"/>
           <xsl:choose>
             <xsl:when test="$nextfoil != ''">
               <a href="{$nextfoil}">
+                <xsl:if test="$next-target != ''">
+                  <xsl:attribute name="target">
+                    <xsl:value-of select="$next-target"/>
+                  </xsl:attribute>
+                </xsl:if>
                 <img alt="Next" border="0">
                   <xsl:attribute name="src">
                     <xsl:call-template name="graphics.dir"/>