From: Norman W. <nw...@us...> - 2004-10-29 13:28:55
|
Update of /cvsroot/docbook/xsl/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12757 Modified Files: verbatim.xsl Log Message: Deprecated shade.verbatim Index: verbatim.xsl =================================================================== RCS file: /cvsroot/docbook/xsl/html/verbatim.xsl,v retrieving revision 1.12 retrieving revision 1.13 diff -u -U2 -r1.12 -r1.13 --- verbatim.xsl 27 Aug 2003 14:26:44 -0000 1.12 +++ verbatim.xsl 29 Oct 2004 13:28:33 -0000 1.13 @@ -29,39 +29,34 @@ <xsl:call-template name="anchor"/> - <xsl:variable name="content"> - <xsl:choose> - <xsl:when test="$suppress-numbers = '0' - and @linenumbering = 'numbered' - and $use.extensions != '0' - and $linenumbering.extension != '0'"> - <xsl:variable name="rtf"> - <xsl:apply-templates/> - </xsl:variable> - <pre class="{name(.)}"> - <xsl:call-template name="number.rtf.lines"> - <xsl:with-param name="rtf" select="$rtf"/> - </xsl:call-template> - </pre> - </xsl:when> - <xsl:otherwise> - <pre class="{name(.)}"> - <xsl:apply-templates/> - </pre> - </xsl:otherwise> - </xsl:choose> - </xsl:variable> + <xsl:if test="$shade.verbatim != 0"> + <xsl:message> + <xsl:text>The shade.verbatim parameter is deprecated. </xsl:text> + <xsl:text>Use CSS instead,</xsl:text> + </xsl:message> + <xsl:message> + <xsl:text>for example: pre.</xsl:text> + <xsl:value-of select="local-name(.)"/> + <xsl:text> { background-color: #E0E0E0; }</xsl:text> + </xsl:message> + </xsl:if> <xsl:choose> - <xsl:when test="$shade.verbatim != 0"> - <table xsl:use-attribute-sets="shade.verbatim.style"> - <tr> - <td> - <xsl:copy-of select="$content"/> - </td> - </tr> - </table> + <xsl:when test="$suppress-numbers = '0' + and @linenumbering = 'numbered' + and $use.extensions != '0' + and $linenumbering.extension != '0'"> + <xsl:variable name="rtf"> + <xsl:apply-templates/> + </xsl:variable> + <pre class="{name(.)}"> + <xsl:call-template name="number.rtf.lines"> + <xsl:with-param name="rtf" select="$rtf"/> + </xsl:call-template> + </pre> </xsl:when> <xsl:otherwise> - <xsl:copy-of select="$content"/> + <pre class="{name(.)}"> + <xsl:apply-templates/> + </pre> </xsl:otherwise> </xsl:choose> @@ -75,63 +70,57 @@ </xsl:variable> - <xsl:variable name="content"> - <xsl:choose> - <xsl:when test="$suppress-numbers = '0' - and @linenumbering = 'numbered' - and $use.extensions != '0' - and $linenumbering.extension != '0'"> - <xsl:choose> - <xsl:when test="@class='monospaced'"> - <pre class="{name(.)}"> - <xsl:call-template name="number.rtf.lines"> - <xsl:with-param name="rtf" select="$rtf"/> - </xsl:call-template> - </pre> - </xsl:when> - <xsl:otherwise> - <div class="{name(.)}"> - <p> - <xsl:call-template name="number.rtf.lines"> - <xsl:with-param name="rtf" select="$rtf"/> - </xsl:call-template> - </p> - </div> - </xsl:otherwise> - </xsl:choose> - </xsl:when> - - <xsl:otherwise> - <xsl:choose> - <xsl:when test="@class='monospaced'"> - <pre class="{name(.)}"> - <xsl:copy-of select="$rtf"/> - </pre> - </xsl:when> - <xsl:otherwise> - <div class="{name(.)}"> - <p> - <xsl:call-template name="make-verbatim"> - <xsl:with-param name="rtf" select="$rtf"/> - </xsl:call-template> - </p> - </div> - </xsl:otherwise> - </xsl:choose> - </xsl:otherwise> - </xsl:choose> - </xsl:variable> + <xsl:if test="$shade.verbatim != 0 and @class='monospaced'"> + <xsl:message> + <xsl:text>The shade.verbatim parameter is deprecated. </xsl:text> + <xsl:text>Use CSS instead,</xsl:text> + </xsl:message> + <xsl:message> + <xsl:text>for example: pre.</xsl:text> + <xsl:value-of select="local-name(.)"/> + <xsl:text> { background-color: #E0E0E0; }</xsl:text> + </xsl:message> + </xsl:if> <xsl:choose> - <xsl:when test="$shade.verbatim != 0 and @class='monospaced'"> - <table xsl:use-attribute-sets="shade.verbatim.style"> - <tr> - <td> - <xsl:copy-of select="$content"/> - </td> - </tr> - </table> + <xsl:when test="$suppress-numbers = '0' + and @linenumbering = 'numbered' + and $use.extensions != '0' + and $linenumbering.extension != '0'"> + <xsl:choose> + <xsl:when test="@class='monospaced'"> + <pre class="{name(.)}"> + <xsl:call-template name="number.rtf.lines"> + <xsl:with-param name="rtf" select="$rtf"/> + </xsl:call-template> + </pre> + </xsl:when> + <xsl:otherwise> + <div class="{name(.)}"> + <p> + <xsl:call-template name="number.rtf.lines"> + <xsl:with-param name="rtf" select="$rtf"/> + </xsl:call-template> + </p> + </div> + </xsl:otherwise> + </xsl:choose> </xsl:when> <xsl:otherwise> - <xsl:copy-of select="$content"/> + <xsl:choose> + <xsl:when test="@class='monospaced'"> + <pre class="{name(.)}"> + <xsl:copy-of select="$rtf"/> + </pre> + </xsl:when> + <xsl:otherwise> + <div class="{name(.)}"> + <p> + <xsl:call-template name="make-verbatim"> + <xsl:with-param name="rtf" select="$rtf"/> + </xsl:call-template> + </p> + </div> + </xsl:otherwise> + </xsl:choose> </xsl:otherwise> </xsl:choose> |