summaryrefslogtreecommitdiffstats
path: root/xsl/main-html.xsl
diff options
context:
space:
mode:
authorPaul W. Frields <stickster@gmail.com>2005-09-04 14:19:07 +0000
committerPaul W. Frields <stickster@gmail.com>2005-09-04 14:19:07 +0000
commit58dc906453b34bd49d7d767ba9824168da719fc6 (patch)
tree0be2a82002b5f77b9f8f02e9410ba4d3513877fd /xsl/main-html.xsl
parentf72b5a429a484bf27fe3a77e07dd8d0d7359e09b (diff)
downloadfedora-doc-utils-58dc906453b34bd49d7d767ba9824168da719fc6.tar.gz
fedora-doc-utils-58dc906453b34bd49d7d767ba9824168da719fc6.tar.xz
fedora-doc-utils-58dc906453b34bd49d7d767ba9824168da719fc6.zip
Generate revision history to separate file, yeah baby!
Diffstat (limited to 'xsl/main-html.xsl')
-rw-r--r--xsl/main-html.xsl100
1 files changed, 100 insertions, 0 deletions
diff --git a/xsl/main-html.xsl b/xsl/main-html.xsl
index 988a5bc..863c8b7 100644
--- a/xsl/main-html.xsl
+++ b/xsl/main-html.xsl
@@ -37,6 +37,106 @@ sect5 nop
section nop
</xsl:param>
+<xsl:template match="revhistory"><!-- mode="titlepage.mode">-->
+ <xsl:variable name="numcols">
+ <xsl:choose>
+ <xsl:when test="//authorinitials">3</xsl:when>
+ <xsl:otherwise>2</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <div class="{name(.)}">
+ <table border="1" width="100%" summary="Revision history">
+ <tr>
+ <th align="left" valign="top" colspan="{$numcols}">
+ <b>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'RevHistory'"/>
+ </xsl:call-template>
+ </b>
+ </th>
+ </tr>
+ <xsl:apply-templates>
+ <xsl:with-param name="numcols" select="$numcols"/>
+ </xsl:apply-templates>
+ </table>
+ </div>
+</xsl:template>
+
+<xsl:template match="revhistory/revision">
+ <xsl:param name="numcols" select="'3'"/>
+ <xsl:variable name="revnumber" select=".//revnumber"/>
+ <xsl:variable name="revdate" select=".//date"/>
+ <xsl:variable name="revauthor" select=".//authorinitials"/>
+ <xsl:variable name="revremark" select=".//revremark|.//revdescription"/>
+ <tr>
+ <td align="left">
+ <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>
+ </td>
+ <td align="left">
+ <xsl:apply-templates select="$revdate[1]"/>
+ </td>
+ <xsl:choose>
+ <xsl:when test="$revauthor">
+ <td align="left">
+ <xsl:apply-templates select="$revauthor[1]"/>
+ </td>
+ </xsl:when>
+ <xsl:when test="$numcols &gt; 2">
+ <td>&#160;</td>
+ </xsl:when>
+ <xsl:otherwise></xsl:otherwise>
+ </xsl:choose>
+ </tr>
+ <xsl:if test="$revremark">
+ <tr>
+ <td align="left" colspan="{$numcols}">
+ <xsl:apply-templates select="$revremark[1]"/>
+ </td>
+ </tr>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="titlepage.mode">
+ <xsl:variable name="id">revhistory</xsl:variable>
+ <xsl:variable name="filename">
+ <xsl:call-template name="make-relative-filename">
+ <xsl:with-param name="base.dir" select="$base.dir"/>
+ <xsl:with-param name="base.name" select="concat('rv-',$id,$html.ext)"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <a href="{concat('rv-',$id,$html.ext)}">Revision History</a>
+
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename" select="$filename"/>
+ <xsl:with-param name="quiet" select="$chunk.quietly"/>
+ <xsl:with-param name="content">
+ <xsl:call-template name="user.preroot"/>
+ <html>
+ <head>
+ <xsl:call-template name="system.head.content"/>
+ <xsl:call-template name="head.content"/>
+ <xsl:call-template name="user.head.content"/>
+ </head>
+ <body>
+ <xsl:call-template name="body.attributes"/>
+ <div class="{local-name(.)}">
+ <xsl:apply-templates select="."/>
+ </div>
+ </body>
+ </html>
+ </xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+
<!-- Navigation
<xsl:param name="navig.graphics" select="1"></xsl:param>
<xsl:param name="navig.graphics.extension" select="'.png'"></xsl:param>