Blame SOURCES/docbook-xsl-pagesetup.patch

dbb139
diff -ruNp docbook-xsl-1.74.0.orig/fo/pagesetup.xsl docbook-xsl-1.74.0/fo/pagesetup.xsl
dbb139
--- docbook-xsl-1.74.0.orig/fo/pagesetup.xsl	2008-06-01 23:36:39.000000000 +0200
dbb139
+++ docbook-xsl-1.74.0/fo/pagesetup.xsl	2008-08-06 13:31:11.000000000 +0200
dbb139
@@ -1697,45 +1697,99 @@
dbb139
         <xsl:with-param name="gentext-key" select="$gentext-key"/>
dbb139
       </xsl:call-template>
dbb139
 
dbb139
-      <fo:table-column column-number="1">
dbb139
-        <xsl:attribute name="column-width">
dbb139
-          <xsl:text>proportional-column-width(</xsl:text>
dbb139
-          <xsl:call-template name="header.footer.width">
dbb139
-            <xsl:with-param name="location">header</xsl:with-param>
dbb139
-            <xsl:with-param name="position" select="$column1"/>
dbb139
-            <xsl:with-param name="pageclass" select="$pageclass"/>
dbb139
-            <xsl:with-param name="sequence" select="$sequence"/>
dbb139
-            <xsl:with-param name="gentext-key" select="$gentext-key"/>
dbb139
-          </xsl:call-template>
dbb139
-          <xsl:text>)</xsl:text>
dbb139
-        </xsl:attribute>
dbb139
-      </fo:table-column>
dbb139
-      <fo:table-column column-number="2">
dbb139
-        <xsl:attribute name="column-width">
dbb139
-          <xsl:text>proportional-column-width(</xsl:text>
dbb139
-          <xsl:call-template name="header.footer.width">
dbb139
-            <xsl:with-param name="location">header</xsl:with-param>
dbb139
-            <xsl:with-param name="position" select="2"/>
dbb139
-            <xsl:with-param name="pageclass" select="$pageclass"/>
dbb139
-            <xsl:with-param name="sequence" select="$sequence"/>
dbb139
-            <xsl:with-param name="gentext-key" select="$gentext-key"/>
dbb139
-          </xsl:call-template>
dbb139
-          <xsl:text>)</xsl:text>
dbb139
-        </xsl:attribute>
dbb139
-      </fo:table-column>
dbb139
-      <fo:table-column column-number="3">
dbb139
-        <xsl:attribute name="column-width">
dbb139
-          <xsl:text>proportional-column-width(</xsl:text>
dbb139
-          <xsl:call-template name="header.footer.width">
dbb139
-            <xsl:with-param name="location">header</xsl:with-param>
dbb139
-            <xsl:with-param name="position" select="$column3"/>
dbb139
-            <xsl:with-param name="pageclass" select="$pageclass"/>
dbb139
-            <xsl:with-param name="sequence" select="$sequence"/>
dbb139
-            <xsl:with-param name="gentext-key" select="$gentext-key"/>
dbb139
-          </xsl:call-template>
dbb139
-          <xsl:text>)</xsl:text>
dbb139
-        </xsl:attribute>
dbb139
-      </fo:table-column>
dbb139
+      <xsl:choose>
dbb139
+        <xsl:when test="$passivetex.extensions != 0">
dbb139
+          <fo:table-column column-number="1">
dbb139
+            <xsl:attribute name="column-width">
dbb139
+              <xsl:call-template name="header.footer.width">
dbb139
+                <xsl:with-param name="location">header</xsl:with-param>
dbb139
+                <xsl:with-param name="position" select="$column1"/>
dbb139
+                <xsl:with-param name="pageclass" select="$pageclass"/>
dbb139
+                <xsl:with-param name="sequence" select="$sequence"/>
dbb139
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
dbb139
+              </xsl:call-template>
dbb139
+              <xsl:text>%</xsl:text>
dbb139
+            </xsl:attribute>
dbb139
+          </fo:table-column>
dbb139
+        </xsl:when>
dbb139
+        <xsl:otherwise>
dbb139
+          <fo:table-column column-number="1">
dbb139
+            <xsl:attribute name="column-width">
dbb139
+              <xsl:text>proportional-column-width(</xsl:text>
dbb139
+              <xsl:call-template name="header.footer.width">
dbb139
+                <xsl:with-param name="location">header</xsl:with-param>
dbb139
+                <xsl:with-param name="position" select="$column1"/>
dbb139
+                <xsl:with-param name="pageclass" select="$pageclass"/>
dbb139
+                <xsl:with-param name="sequence" select="$sequence"/>
dbb139
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
dbb139
+              </xsl:call-template>
dbb139
+              <xsl:text>)</xsl:text>
dbb139
+            </xsl:attribute>
dbb139
+          </fo:table-column>
dbb139
+        </xsl:otherwise>
dbb139
+			</xsl:choose>
dbb139
+      <xsl:choose>
dbb139
+        <xsl:when test="$passivetex.extensions != 0">
dbb139
+          <fo:table-column column-number="2">
dbb139
+            <xsl:attribute name="column-width">
dbb139
+              <xsl:call-template name="header.footer.width">
dbb139
+                <xsl:with-param name="location">header</xsl:with-param>
dbb139
+                <xsl:with-param name="position" select="2"/>
dbb139
+                <xsl:with-param name="pageclass" select="$pageclass"/>
dbb139
+                <xsl:with-param name="sequence" select="$sequence"/>
dbb139
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
dbb139
+              </xsl:call-template>
dbb139
+              <xsl:text>%</xsl:text>
dbb139
+            </xsl:attribute>
dbb139
+          </fo:table-column>
dbb139
+        </xsl:when>
dbb139
+        <xsl:otherwise>
dbb139
+          <fo:table-column column-number="2">
dbb139
+            <xsl:attribute name="column-width">
dbb139
+              <xsl:text>proportional-column-width(</xsl:text>
dbb139
+              <xsl:call-template name="header.footer.width">
dbb139
+                <xsl:with-param name="location">header</xsl:with-param>
dbb139
+                <xsl:with-param name="position" select="2"/>
dbb139
+                <xsl:with-param name="pageclass" select="$pageclass"/>
dbb139
+                <xsl:with-param name="sequence" select="$sequence"/>
dbb139
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
dbb139
+              </xsl:call-template>
dbb139
+              <xsl:text>)</xsl:text>
dbb139
+            </xsl:attribute>
dbb139
+          </fo:table-column>
dbb139
+        </xsl:otherwise>
dbb139
+      </xsl:choose>
dbb139
+      <xsl:choose>
dbb139
+        <xsl:when test="$passivetex.extensions != 0">
dbb139
+          <fo:table-column column-number="3">
dbb139
+            <xsl:attribute name="column-width">
dbb139
+              <xsl:call-template name="header.footer.width">
dbb139
+                <xsl:with-param name="location">header</xsl:with-param>
dbb139
+                <xsl:with-param name="position" select="$column3"/>
dbb139
+                <xsl:with-param name="pageclass" select="$pageclass"/>
dbb139
+                <xsl:with-param name="sequence" select="$sequence"/>
dbb139
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
dbb139
+              </xsl:call-template>
dbb139
+              <xsl:text>%</xsl:text>
dbb139
+            </xsl:attribute>
dbb139
+          </fo:table-column>
dbb139
+        </xsl:when>
dbb139
+        <xsl:otherwise>
dbb139
+          <fo:table-column column-number="3">
dbb139
+            <xsl:attribute name="column-width">
dbb139
+              <xsl:text>proportional-column-width(</xsl:text>
dbb139
+              <xsl:call-template name="header.footer.width">
dbb139
+                <xsl:with-param name="location">header</xsl:with-param>
dbb139
+                <xsl:with-param name="position" select="$column3"/>
dbb139
+                <xsl:with-param name="pageclass" select="$pageclass"/>
dbb139
+                <xsl:with-param name="sequence" select="$sequence"/>
dbb139
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
dbb139
+              </xsl:call-template>
dbb139
+              <xsl:text>)</xsl:text>
dbb139
+            </xsl:attribute>
dbb139
+          </fo:table-column>
dbb139
+        </xsl:otherwise>
dbb139
+      </xsl:choose>
dbb139
 
dbb139
       <fo:table-body>
dbb139
         <fo:table-row>
dbb139
@@ -2021,45 +2066,99 @@
dbb139
         <xsl:with-param name="sequence" select="$sequence"/>
dbb139
         <xsl:with-param name="gentext-key" select="$gentext-key"/>
dbb139
       </xsl:call-template>
dbb139
-      <fo:table-column column-number="1">
dbb139
-        <xsl:attribute name="column-width">
dbb139
-          <xsl:text>proportional-column-width(</xsl:text>
dbb139
-          <xsl:call-template name="header.footer.width">
dbb139
-            <xsl:with-param name="location">footer</xsl:with-param>
dbb139
-            <xsl:with-param name="position" select="$column1"/>
dbb139
-            <xsl:with-param name="pageclass" select="$pageclass"/>
dbb139
-            <xsl:with-param name="sequence" select="$sequence"/>
dbb139
-            <xsl:with-param name="gentext-key" select="$gentext-key"/>
dbb139
-          </xsl:call-template>
dbb139
-          <xsl:text>)</xsl:text>
dbb139
-        </xsl:attribute>
dbb139
-      </fo:table-column>
dbb139
-      <fo:table-column column-number="2">
dbb139
-        <xsl:attribute name="column-width">
dbb139
-          <xsl:text>proportional-column-width(</xsl:text>
dbb139
-          <xsl:call-template name="header.footer.width">
dbb139
-            <xsl:with-param name="location">footer</xsl:with-param>
dbb139
-            <xsl:with-param name="position" select="2"/>
dbb139
-            <xsl:with-param name="pageclass" select="$pageclass"/>
dbb139
-            <xsl:with-param name="sequence" select="$sequence"/>
dbb139
-            <xsl:with-param name="gentext-key" select="$gentext-key"/>
dbb139
-          </xsl:call-template>
dbb139
-          <xsl:text>)</xsl:text>
dbb139
-        </xsl:attribute>
dbb139
-      </fo:table-column>
dbb139
-      <fo:table-column column-number="3">
dbb139
-        <xsl:attribute name="column-width">
dbb139
-          <xsl:text>proportional-column-width(</xsl:text>
dbb139
-          <xsl:call-template name="header.footer.width">
dbb139
-            <xsl:with-param name="location">footer</xsl:with-param>
dbb139
-            <xsl:with-param name="position" select="$column3"/>
dbb139
-            <xsl:with-param name="pageclass" select="$pageclass"/>
dbb139
-            <xsl:with-param name="sequence" select="$sequence"/>
dbb139
-            <xsl:with-param name="gentext-key" select="$gentext-key"/>
dbb139
-          </xsl:call-template>
dbb139
-          <xsl:text>)</xsl:text>
dbb139
-        </xsl:attribute>
dbb139
-      </fo:table-column>
dbb139
+      <xsl:choose>
dbb139
+        <xsl:when test="$passivetex.extensions != 0">
dbb139
+          <fo:table-column column-number="1">
dbb139
+            <xsl:attribute name="column-width">
dbb139
+              <xsl:call-template name="header.footer.width">
dbb139
+                <xsl:with-param name="location">footer</xsl:with-param>
dbb139
+                <xsl:with-param name="position" select="$column1"/>
dbb139
+                <xsl:with-param name="pageclass" select="$pageclass"/>
dbb139
+                <xsl:with-param name="sequence" select="$sequence"/>
dbb139
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
dbb139
+              </xsl:call-template>
dbb139
+              <xsl:text>%</xsl:text>
dbb139
+            </xsl:attribute>
dbb139
+          </fo:table-column>
dbb139
+        </xsl:when>
dbb139
+        <xsl:otherwise>
dbb139
+          <fo:table-column column-number="1">
dbb139
+            <xsl:attribute name="column-width">
dbb139
+              <xsl:text>proportional-column-width(</xsl:text>
dbb139
+              <xsl:call-template name="header.footer.width">
dbb139
+                <xsl:with-param name="location">footer</xsl:with-param>
dbb139
+                <xsl:with-param name="position" select="$column1"/>
dbb139
+                <xsl:with-param name="pageclass" select="$pageclass"/>
dbb139
+                <xsl:with-param name="sequence" select="$sequence"/>
dbb139
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
dbb139
+              </xsl:call-template>
dbb139
+              <xsl:text>)</xsl:text>
dbb139
+            </xsl:attribute>
dbb139
+          </fo:table-column>
dbb139
+        </xsl:otherwise>
dbb139
+      </xsl:choose>
dbb139
+      <xsl:choose>
dbb139
+        <xsl:when test="$passivetex.extensions != 0">
dbb139
+          <fo:table-column column-number="2">
dbb139
+            <xsl:attribute name="column-width">
dbb139
+              <xsl:call-template name="header.footer.width">
dbb139
+                <xsl:with-param name="location">footer</xsl:with-param>
dbb139
+                <xsl:with-param name="position" select="2"/>
dbb139
+                <xsl:with-param name="pageclass" select="$pageclass"/>
dbb139
+                <xsl:with-param name="sequence" select="$sequence"/>
dbb139
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
dbb139
+              </xsl:call-template>
dbb139
+              <xsl:text>%</xsl:text>
dbb139
+            </xsl:attribute>
dbb139
+          </fo:table-column>
dbb139
+        </xsl:when>
dbb139
+        <xsl:otherwise>
dbb139
+          <fo:table-column column-number="2">
dbb139
+            <xsl:attribute name="column-width">
dbb139
+              <xsl:text>proportional-column-width(</xsl:text>
dbb139
+              <xsl:call-template name="header.footer.width">
dbb139
+                <xsl:with-param name="location">footer</xsl:with-param>
dbb139
+                <xsl:with-param name="position" select="2"/>
dbb139
+                <xsl:with-param name="pageclass" select="$pageclass"/>
dbb139
+                <xsl:with-param name="sequence" select="$sequence"/>
dbb139
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
dbb139
+              </xsl:call-template>
dbb139
+              <xsl:text>)</xsl:text>
dbb139
+            </xsl:attribute>
dbb139
+          </fo:table-column>
dbb139
+        </xsl:otherwise>
dbb139
+      </xsl:choose>
dbb139
+      <xsl:choose>
dbb139
+        <xsl:when test="$passivetex.extensions != 0">
dbb139
+          <fo:table-column column-number="3">
dbb139
+            <xsl:attribute name="column-width">
dbb139
+              <xsl:call-template name="header.footer.width">
dbb139
+                <xsl:with-param name="location">footer</xsl:with-param>
dbb139
+                <xsl:with-param name="position" select="$column3"/>
dbb139
+                <xsl:with-param name="pageclass" select="$pageclass"/>
dbb139
+                <xsl:with-param name="sequence" select="$sequence"/>
dbb139
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
dbb139
+              </xsl:call-template>
dbb139
+              <xsl:text>%</xsl:text>
dbb139
+            </xsl:attribute>
dbb139
+          </fo:table-column>
dbb139
+        </xsl:when>
dbb139
+        <xsl:otherwise>
dbb139
+          <fo:table-column column-number="3">
dbb139
+            <xsl:attribute name="column-width">
dbb139
+              <xsl:text>proportional-column-width(</xsl:text>
dbb139
+              <xsl:call-template name="header.footer.width">
dbb139
+                <xsl:with-param name="location">footer</xsl:with-param>
dbb139
+                <xsl:with-param name="position" select="$column3"/>
dbb139
+                <xsl:with-param name="pageclass" select="$pageclass"/>
dbb139
+                <xsl:with-param name="sequence" select="$sequence"/>
dbb139
+                <xsl:with-param name="gentext-key" select="$gentext-key"/>
dbb139
+              </xsl:call-template>
dbb139
+              <xsl:text>)</xsl:text>
dbb139
+            </xsl:attribute>
dbb139
+          </fo:table-column>
dbb139
+        </xsl:otherwise>
dbb139
+      </xsl:choose>
dbb139
 
dbb139
       <fo:table-body>
dbb139
         <fo:table-row>