]> granicus.if.org Git - docbook-dsssl/commitdiff
Add support for dbfo row-height processing instruction, like
authorBob Stayton <bobs@sagehill.net>
Tue, 24 Mar 2009 18:34:18 +0000 (18:34 +0000)
committerBob Stayton <bobs@sagehill.net>
Tue, 24 Mar 2009 18:34:18 +0000 (18:34 +0000)
that in dbhtml.

xsl/fo/pi.xsl
xsl/fo/table.xsl

index 7385b18ee1ea390c3f9606e3ca6ff0dfe5ba624e..257f4d76c1c39775aefa72c92dc223db4f695ebf 100644 (file)
         >Soft page breaks</link></para>
   </refsee>
 </doc:pi>
+
+<doc:pi name="dbfo_row-height" xmlns="">
+  <refpurpose>Specifies the height for a CALS table row</refpurpose>
+  <refdescription>
+    <para>Use the <tag class="xmlpi">dbfo row-height</tag> PI as a child of a
+      <tag>row</tag> to specify the height of the row.</para>
+  </refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbfo row-height="<replaceable>height</replaceable>"</tag></synopsis>
+  </refsynopsisdiv>
+  <refparameter>
+    <variablelist>
+      <varlistentry><term>row-height="<replaceable>height</replaceable>"</term>
+        <listitem>
+          <para>Specifies the label height (including units)</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refparameter>
+  <refsee role="tcg">
+    <para><link role="tcg"
+        xlink:href="RowHeight.html"
+        >Row height</link></para>
+  </refsee>
+</doc:pi>
+<xsl:template name="pi.dbfo_row-height">
+  <xsl:param name="node" select="."/>
+  <xsl:call-template name="dbfo-attribute">
+    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
+    <xsl:with-param name="attribute" select="'row-height'"/>
+  </xsl:call-template>
+</xsl:template> 
+
+
 <xsl:template name="pi.dbfo-need">
   <xsl:variable name="pi-height">
     <xsl:call-template name="dbfo-attribute">
index 82f1bdcf19e32c34e5f544e040e0f2ada1aa4314..8d35dc1bde81fa9ae8a7c5e88d5ab0aa1b10e794 100644 (file)
 
 <!-- customize this template to add row properties -->
 <xsl:template name="table.row.properties">
+
+  <xsl:variable name="row-height">
+    <xsl:if test="processing-instruction('dbfo')">
+      <xsl:call-template name="pi.dbfo_row-height"/>
+    </xsl:if>
+  </xsl:variable>
+
+  <xsl:if test="$row-height != ''">
+    <xsl:attribute name="block-progression-dimension">
+      <xsl:value-of select="$row-height"/>
+    </xsl:attribute>
+  </xsl:if>
+
   <xsl:variable name="bgcolor">
     <xsl:call-template name="pi.dbfo_bgcolor"/>
   </xsl:variable>
+
   <xsl:if test="$bgcolor != ''">
     <xsl:attribute name="background-color">
       <xsl:value-of select="$bgcolor"/>