]> granicus.if.org Git - docbook-dsssl/commitdiff
Support RevHistory in content; support AckNo in article
authorNorman Walsh <ndw@nwalsh.com>
Mon, 18 Mar 2002 20:43:05 +0000 (20:43 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Mon, 18 Mar 2002 20:43:05 +0000 (20:43 +0000)
xsl/fo/block.xsl

index 9769983fea441008c5418af73c45029d8009535c..49103d93c56d9555f01599c18c48f0c6994c603f 100644 (file)
   </fo:block>
 </xsl:template>
 
+<!-- ==================================================================== -->
+<!-- For better or worse, revhistory is allowed in content... -->
+
+<xsl:template match="revhistory">
+  <fo:table table-layout="fixed">
+    <fo:table-column column-number="1" column-width="33%"/>
+    <fo:table-column column-number="2" column-width="33%"/>
+    <fo:table-column column-number="3" column-width="33%"/>
+    <fo:table-body>
+      <fo:table-row>
+        <fo:table-cell number-columns-spanned="3">
+          <fo:block>
+            <xsl:call-template name="gentext">
+              <xsl:with-param name="key" select="'RevHistory'"/>
+            </xsl:call-template>
+          </fo:block>
+        </fo:table-cell>
+      </fo:table-row>
+      <xsl:apply-templates/>
+    </fo:table-body>
+  </fo:table>
+</xsl:template>
+
+<xsl:template match="revhistory/revision">
+  <xsl:variable name="revnumber" select=".//revnumber"/>
+  <xsl:variable name="revdate"   select=".//date"/>
+  <xsl:variable name="revauthor" select=".//authorinitials"/>
+  <xsl:variable name="revremark" select=".//revremark"/>
+  <fo:table-row>
+    <fo:table-cell>
+      <fo:block>
+        <xsl:if test="$revnumber">
+          <xsl:call-template name="gentext">
+            <xsl:with-param name="key" select="'Revision'"/>
+          </xsl:call-template>
+          <xsl:call-template name="gentext.space"/>
+          <xsl:apply-templates select="$revnumber[1]"/>
+        </xsl:if>
+      </fo:block>
+    </fo:table-cell>
+    <fo:table-cell>
+      <fo:block>
+        <xsl:apply-templates select="$revdate[1]"/>
+      </fo:block>
+    </fo:table-cell>
+    <fo:table-cell>
+      <fo:block>
+        <xsl:apply-templates select="$revauthor[1]"/>
+      </fo:block>
+    </fo:table-cell>
+  </fo:table-row>
+  <xsl:if test="$revremark">
+    <fo:table-row>
+      <fo:table-cell number-columns-spanned="3">
+        <fo:block>
+          <xsl:apply-templates select="$revremark[1]"/>
+        </fo:block>
+      </fo:table-cell>
+    </fo:table-row>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="revision/revnumber">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="revision/date">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="revision/authorinitials">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="revision/revremark">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="ackno">
+  <fo:block xsl:use-attribute-sets="normal.para.spacing">
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
 <!-- ==================================================================== -->
 
 <xsl:template match="highlights">