From: <bob...@us...> - 2009-12-11 00:07:19
|
Revision: 8557 http://docbook.svn.sourceforge.net/docbook/?rev=8557&view=rev Author: bobstayton Date: 2009-12-11 00:07:12 +0000 (Fri, 11 Dec 2009) Log Message: ----------- Add support for make.clean.html setting in block elements. Modified Paths: -------------- trunk/xsl/html/block.xsl trunk/xsl/html/docbook.css.xml Modified: trunk/xsl/html/block.xsl =================================================================== --- trunk/xsl/html/block.xsl 2009-12-11 00:05:45 UTC (rev 8556) +++ trunk/xsl/html/block.xsl 2009-12-11 00:07:12 UTC (rev 8557) @@ -127,14 +127,28 @@ </xsl:if> </xsl:variable> - <b> - <xsl:copy-of select="$titleStr"/> - <xsl:if test="$lastChar != '' - and not(contains($runinhead.title.end.punct, $lastChar))"> - <xsl:value-of select="$runinhead.default.title.end.punct"/> - </xsl:if> - <xsl:text> </xsl:text> - </b> + <xsl:choose> + <xsl:when test="$make.clean.html != 0"> + <span class="formalpara-title"> + <xsl:copy-of select="$titleStr"/> + <xsl:if test="$lastChar != '' + and not(contains($runinhead.title.end.punct, $lastChar))"> + <xsl:value-of select="$runinhead.default.title.end.punct"/> + </xsl:if> + <xsl:text> </xsl:text> + </span> + </xsl:when> + <xsl:otherwise> + <b> + <xsl:copy-of select="$titleStr"/> + <xsl:if test="$lastChar != '' + and not(contains($runinhead.title.end.punct, $lastChar))"> + <xsl:value-of select="$runinhead.default.title.end.punct"/> + </xsl:if> + <xsl:text> </xsl:text> + </b> + </xsl:otherwise> + </xsl:choose> </xsl:template> <xsl:template match="formalpara/para"> @@ -180,13 +194,22 @@ </xsl:template> <xsl:template match="blockquote/title|blockquote/info/title"> - <div class="blockquote-title"> - <p> - <b> + <xsl:choose> + <xsl:when test="$make.clean.html != 0"> + <div class="blockquote-title"> <xsl:apply-templates/> - </b> - </p> - </div> + </div> + </xsl:when> + <xsl:otherwise> + <div class="blockquote-title"> + <p> + <b> + <xsl:apply-templates/> + </b> + </p> + </div> + </xsl:otherwise> + </xsl:choose> </xsl:template> <!-- Use an em dash per Chicago Manual of Style and https://sourceforge.net/tracker/index.php?func=detail&aid=2793878&group_id=21935&atid=373747 --> @@ -254,7 +277,16 @@ </xsl:template> <xsl:template match="msgmain/title"> - <b><xsl:apply-templates/></b> + <xsl:choose> + <xsl:when test="$make.clean.html != 0"> + <span class="msgmain-title"> + <xsl:apply-templates/> + </span> + </xsl:when> + <xsl:otherwise> + <b><xsl:apply-templates/></b> + </xsl:otherwise> + </xsl:choose> </xsl:template> <xsl:template match="msgsub"> @@ -262,7 +294,16 @@ </xsl:template> <xsl:template match="msgsub/title"> - <b><xsl:apply-templates/></b> + <xsl:choose> + <xsl:when test="$make.clean.html != 0"> + <span class="msgsub-title"> + <xsl:apply-templates/> + </span> + </xsl:when> + <xsl:otherwise> + <b><xsl:apply-templates/></b> + </xsl:otherwise> + </xsl:choose> </xsl:template> <xsl:template match="msgrel"> @@ -270,7 +311,16 @@ </xsl:template> <xsl:template match="msgrel/title"> - <b><xsl:apply-templates/></b> + <xsl:choose> + <xsl:when test="$make.clean.html != 0"> + <span class="msgrel-title"> + <xsl:apply-templates/> + </span> + </xsl:when> + <xsl:otherwise> + <b><xsl:apply-templates/></b> + </xsl:otherwise> + </xsl:choose> </xsl:template> <xsl:template match="msgtext"> @@ -282,39 +332,84 @@ </xsl:template> <xsl:template match="msglevel"> - <p> - <b> - <xsl:call-template name="gentext.template"> - <xsl:with-param name="context" select="'msgset'"/> - <xsl:with-param name="name" select="'MsgLevel'"/> - </xsl:call-template> - </b> - <xsl:apply-templates/> - </p> + <xsl:choose> + <xsl:when test="$make.clean.html != 0"> + <div class="msglevel"> + <span class="msglevel-title"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'msgset'"/> + <xsl:with-param name="name" select="'MsgLevel'"/> + </xsl:call-template> + </span> + <xsl:apply-templates/> + </div> + </xsl:when> + <xsl:otherwise> + <p> + <b> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'msgset'"/> + <xsl:with-param name="name" select="'MsgLevel'"/> + </xsl:call-template> + </b> + <xsl:apply-templates/> + </p> + </xsl:otherwise> + </xsl:choose> </xsl:template> <xsl:template match="msgorig"> - <p> - <b> - <xsl:call-template name="gentext.template"> - <xsl:with-param name="context" select="'msgset'"/> - <xsl:with-param name="name" select="'MsgOrig'"/> - </xsl:call-template> - </b> - <xsl:apply-templates/> - </p> + <xsl:choose> + <xsl:when test="$make.clean.html != 0"> + <div class="msgorig"> + <span class="msgorig-title"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'msgset'"/> + <xsl:with-param name="name" select="'MsgOrig'"/> + </xsl:call-template> + </span> + <xsl:apply-templates/> + </div> + </xsl:when> + <xsl:otherwise> + <p> + <b> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'msgset'"/> + <xsl:with-param name="name" select="'MsgOrig'"/> + </xsl:call-template> + </b> + <xsl:apply-templates/> + </p> + </xsl:otherwise> + </xsl:choose> </xsl:template> <xsl:template match="msgaud"> - <p> - <b> - <xsl:call-template name="gentext.template"> - <xsl:with-param name="context" select="'msgset'"/> - <xsl:with-param name="name" select="'MsgAud'"/> - </xsl:call-template> - </b> - <xsl:apply-templates/> - </p> + <xsl:choose> + <xsl:when test="$make.clean.html != 0"> + <div class="msgaud"> + <span class="msgaud-title"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'msgset'"/> + <xsl:with-param name="name" select="'MsgAud'"/> + </xsl:call-template> + </span> + <xsl:apply-templates/> + </div> + </xsl:when> + <xsl:otherwise> + <p> + <b> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'msgset'"/> + <xsl:with-param name="name" select="'MsgAud'"/> + </xsl:call-template> + </b> + <xsl:apply-templates/> + </p> + </xsl:otherwise> + </xsl:choose> </xsl:template> <xsl:template match="msgexplan"> @@ -322,7 +417,22 @@ </xsl:template> <xsl:template match="msgexplan/title"> - <p><b><xsl:apply-templates/></b></p> + <xsl:choose> + <xsl:when test="$make.clean.html != 0"> + <div class="msgexplan"> + <span class="msgexplan-title"> + <xsl:apply-templates/> + </span> + </div> + </xsl:when> + <xsl:otherwise> + <p> + <b> + <xsl:apply-templates/> + </b> + </p> + </xsl:otherwise> + </xsl:choose> </xsl:template> <!-- ==================================================================== --> Modified: trunk/xsl/html/docbook.css.xml =================================================================== --- trunk/xsl/html/docbook.css.xml 2009-12-11 00:05:45 UTC (rev 8556) +++ trunk/xsl/html/docbook.css.xml 2009-12-11 00:07:12 UTC (rev 8557) @@ -1,3 +1,50 @@ <?xml version="1.0"?> <style> + +/********************************/ +/* start of styles in block.xsl */ +/********************************/ +.formalpara-title { + font-weight: bold; +} + +div.blockquote-title { + font-weight: bold; + margin-top: 1em; + margin-bottom: 1em; +} + +span.msgmain-title { + font-weight: bold; +} + +span.msgsub-title { + font-weight: bold; +} + +span.msgrel-title { + font-weight: bold; +} + +div.msglevel, div.msgorig, div.msgaud { + margin-top: 1em; + margin-bottom: 1em; +} + +span.msglevel-title, span.msgorig-title, span.msgaud-title { + font-weight: bold; +} + +div.msgexplan { + margin-top: 1em; + margin-bottom: 1em; +} + +span.msgexplan-title { + font-weight: bold; +} + +/********************************/ +/* end of styles in block.xsl */ +/********************************/ </style> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |