]> granicus.if.org Git - docbook-dsssl/commitdiff
Use body.attributes named template; support navtocwidth and navbgcolor as a page...
authorNorman Walsh <ndw@nwalsh.com>
Wed, 20 Mar 2002 16:59:23 +0000 (16:59 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Wed, 20 Mar 2002 16:59:23 +0000 (16:59 +0000)
website/xsl/tabular.xsl

index 6744c65bc709f2c3e6e4644e93dd8fc3ac09268c..2a175ecbab6b98e4acfdeae93e51f2e631075aba 100644 (file)
   <xsl:attribute name="align">left</xsl:attribute>
   <!-- width is set with $navotocwidth -->
   <xsl:attribute name="bgcolor">
-    <xsl:value-of select="$navbgcolor"/>
+    <xsl:choose>
+      <xsl:when test="/webpage/config[@param='navbgcolor']/@value[. != '']">
+        <xsl:value-of select="/webpage/config[@param='navbgcolor']/@value"/>
+      </xsl:when>
+      <xsl:when test="$autolayout/autolayout/config[@param='navbgcolor']/@value[. != '']">
+        <xsl:value-of select="$autolayout/autolayout/config[@param='navbgcolor']/@value"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$navbgcolor"/>
+      </xsl:otherwise>
+    </xsl:choose>
   </xsl:attribute>
 </xsl:attribute-set>
 
   <html>
     <xsl:apply-templates select="head" mode="head.mode"/>
     <xsl:apply-templates select="config" mode="head.mode"/>
-    <body xsl:use-attribute-sets="body.attributes" class="tabular">
+    <body class="tabular">
+      <xsl:call-template name="body.attributes"/>
 
       <div id="{$id}" class="{name(.)}">
         <a name="{$id}"/>
             <td xsl:use-attribute-sets="table.navigation.cell.properties">
               <xsl:if test="$navtocwidth != ''">
                 <xsl:attribute name="width">
-                  <xsl:value-of select="$navtocwidth"/>
+                  <xsl:choose>
+                    <xsl:when test="/webpage/config[@param='navtocwidth']/@value[. != '']">
+                      <xsl:value-of select="/webpage/config[@param='navtocwidth']/@value"/>
+                    </xsl:when>
+                    <xsl:when test="$autolayout/autolayout/config[@param='navtocwidth']/@value[. != '']">
+                      <xsl:value-of select="$autolayout/autolayout/config[@param='navtocwidth']/@value"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+                      <xsl:value-of select="$navtocwidth"/>
+                    </xsl:otherwise>
+                  </xsl:choose>
                 </xsl:attribute>
               </xsl:if>
               <xsl:choose>