From: <bob...@us...> - 2009-03-22 06:11:47
|
Revision: 8367 http://docbook.svn.sourceforge.net/docbook/?rev=8367&view=rev Author: bobstayton Date: 2009-03-22 06:11:44 +0000 (Sun, 22 Mar 2009) Log Message: ----------- Replace more literal class atts with mode="class.attribute" to support easier customization. Modified Paths: -------------- trunk/xsl/html/lists.xsl Modified: trunk/xsl/html/lists.xsl =================================================================== --- trunk/xsl/html/lists.xsl 2009-03-21 07:49:16 UTC (rev 8366) +++ trunk/xsl/html/lists.xsl 2009-03-22 06:11:44 UTC (rev 8367) @@ -154,39 +154,39 @@ <xsl:choose> <xsl:when test="@inheritnum='inherit' and ancestor::listitem[parent::orderedlist]"> - <table border="0"> - <col align="{$direction.align.start}" valign="top"/> + <table border="0"> + <col align="{$direction.align.start}" valign="top"/> <tbody> - <xsl:apply-templates - mode="orderedlist-table" - select="listitem - |comment()[preceding-sibling::listitem] - |processing-instruction()[preceding-sibling::listitem]"/> + <xsl:apply-templates + mode="orderedlist-table" + select="listitem + |comment()[preceding-sibling::listitem] + |processing-instruction()[preceding-sibling::listitem]"/> </tbody> </table> </xsl:when> <xsl:otherwise> - <ol> - <xsl:if test="$start != '1'"> - <xsl:attribute name="start"> - <xsl:value-of select="$start"/> - </xsl:attribute> - </xsl:if> - <xsl:if test="$numeration != ''"> - <xsl:attribute name="type"> - <xsl:value-of select="$type"/> - </xsl:attribute> - </xsl:if> - <xsl:if test="@spacing='compact'"> - <xsl:attribute name="compact"> - <xsl:value-of select="@spacing"/> - </xsl:attribute> - </xsl:if> - <xsl:apply-templates - select="listitem - |comment()[preceding-sibling::listitem] - |processing-instruction()[preceding-sibling::listitem]"/> - </ol> + <ol> + <xsl:if test="$start != '1'"> + <xsl:attribute name="start"> + <xsl:value-of select="$start"/> + </xsl:attribute> + </xsl:if> + <xsl:if test="$numeration != ''"> + <xsl:attribute name="type"> + <xsl:value-of select="$type"/> + </xsl:attribute> + </xsl:if> + <xsl:if test="@spacing='compact'"> + <xsl:attribute name="compact"> + <xsl:value-of select="@spacing"/> + </xsl:attribute> + </xsl:if> + <xsl:apply-templates + select="listitem + |comment()[preceding-sibling::listitem] + |processing-instruction()[preceding-sibling::listitem]"/> + </ol> </xsl:otherwise> </xsl:choose> </div> @@ -232,18 +232,18 @@ </td> <td> <xsl:if test="local-name(child::*[1]) != 'para'"> - <xsl:call-template name="anchor"/> + <xsl:call-template name="anchor"/> </xsl:if> <xsl:choose> - <xsl:when test="$show.revisionflag != 0 and @revisionflag"> - <div class="{@revisionflag}"> - <xsl:apply-templates/> - </div> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates/> - </xsl:otherwise> + <xsl:when test="$show.revisionflag != 0 and @revisionflag"> + <div class="{@revisionflag}"> + <xsl:apply-templates/> + </div> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> </xsl:choose> </td> </tr> @@ -449,7 +449,8 @@ </xsl:template> <xsl:template match="varlistentry/term"> - <span class="term"> + <span> + <xsl:apply-templates select="." mode="class.attribute"/> <xsl:call-template name="anchor"/> <xsl:call-template name="simple.xlink"> <xsl:with-param name="content"> @@ -497,7 +498,8 @@ <xsl:template match="simplelist"> <!-- with no type specified, the default is 'vert' --> <xsl:call-template name="anchor"/> - <table class="simplelist" border="0" summary="Simple list"> + <table border="0" summary="Simple list"> + <xsl:apply-templates select="." mode="class.attribute"/> <xsl:call-template name="simplelist.vert"> <xsl:with-param name="cols"> <xsl:choose> @@ -537,13 +539,13 @@ <xsl:choose> <xsl:when test="position() = last()"/> <!-- do nothing --> <xsl:otherwise> - <xsl:text>, </xsl:text> - <xsl:if test="position() = last() - 1"> - <xsl:if test="$localized-choice-separator != ''"> - <xsl:value-of select="$localized-choice-separator"/> - <xsl:text> </xsl:text> - </xsl:if> - </xsl:if> + <xsl:text>, </xsl:text> + <xsl:if test="position() = last() - 1"> + <xsl:if test="$localized-choice-separator != ''"> + <xsl:value-of select="$localized-choice-separator"/> + <xsl:text> </xsl:text> + </xsl:if> + </xsl:if> </xsl:otherwise> </xsl:choose> </xsl:for-each> @@ -552,7 +554,8 @@ <xsl:template match="simplelist[@type='horiz']"> <xsl:call-template name="anchor"/> - <table class="simplelist" border="0" summary="Simple list"> + <table border="0" summary="Simple list"> + <xsl:apply-templates select="." mode="class.attribute"/> <xsl:call-template name="simplelist.horiz"> <xsl:with-param name="cols"> <xsl:choose> @@ -568,7 +571,8 @@ <xsl:template match="simplelist[@type='vert']"> <xsl:call-template name="anchor"/> - <table class="simplelist" border="0" summary="Simple list"> + <table border="0" summary="Simple list"> + <xsl:apply-templates select="." mode="class.attribute"/> <xsl:call-template name="simplelist.vert"> <xsl:with-param name="cols"> <xsl:choose> @@ -733,9 +737,9 @@ <xsl:call-template name="anchor"> <xsl:with-param name="conditional"> <xsl:choose> - <xsl:when test="title">0</xsl:when> - <xsl:otherwise>1</xsl:otherwise> - </xsl:choose> + <xsl:when test="title">0</xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> </xsl:with-param> </xsl:call-template> @@ -806,7 +810,8 @@ </xsl:template> <xsl:template match="step/title"> - <p class="title"> + <p> + <xsl:apply-templates select="." mode="class.attribute"/> <b> <xsl:apply-templates/> </b> @@ -842,8 +847,14 @@ </xsl:template> <xsl:template match="segmentedlist/title"> - <div class="title"> - <strong><span class="title"><xsl:apply-templates/></span></strong> + <div> + <xsl:apply-templates select="." mode="class.attribute"/> + <strong> + <span> + <xsl:apply-templates select="." mode="class.attribute"/> + <xsl:apply-templates/> + </span> + </strong> </div> </xsl:template> @@ -855,7 +866,8 @@ </xsl:template> <xsl:template match="seglistitem"> - <div class="seglistitem"> + <div> + <xsl:apply-templates select="." mode="class.attribute"/> <xsl:call-template name="anchor"/> <xsl:apply-templates/> </div> @@ -872,7 +884,8 @@ you'll get something odd...maybe an error --> - <div class="seg"> + <div> + <xsl:apply-templates select="." mode="class.attribute"/> <strong> <span class="segtitle"> <xsl:apply-templates select="$segtitles[$segnum=position()]" @@ -930,7 +943,8 @@ <xsl:number from="segmentedlist" count="seglistitem"/> </xsl:variable> - <tr class="seglistitem"> + <tr> + <xsl:apply-templates select="." mode="class.attribute"/> <xsl:call-template name="tr.attributes"> <xsl:with-param name="rownum" select="$seglinum + 1"/> </xsl:call-template> @@ -939,11 +953,15 @@ </xsl:template> <xsl:template match="seg" mode="seglist-table"> - <td class="seg"><xsl:apply-templates/></td> + <td> + <xsl:apply-templates select="." mode="class.attribute"/> + <xsl:apply-templates/> + </td> </xsl:template> <xsl:template match="seg[1]" mode="seglist-table"> - <td class="seg"> + <td> + <xsl:apply-templates select="." mode="class.attribute"/> <xsl:call-template name="anchor"> <xsl:with-param name="node" select="ancestor::seglistitem"/> </xsl:call-template> @@ -965,22 +983,22 @@ <xsl:apply-templates select="*[not(self::callout or self::title or self::titleabbrev)] |comment()[not(preceding-sibling::callout)] - |processing-instruction()[not(preceding-sibling::callout)]"/> + |processing-instruction()[not(preceding-sibling::callout)]"/> <xsl:choose> <xsl:when test="$callout.list.table != 0"> <table border="0" summary="Callout list"> - <xsl:apply-templates select="callout - |comment()[preceding-sibling::callout] - |processing-instruction()[preceding-sibling::callout]"/> - </table> + <xsl:apply-templates select="callout + |comment()[preceding-sibling::callout] + |processing-instruction()[preceding-sibling::callout]"/> + </table> </xsl:when> <xsl:otherwise> - <dl compact="compact"> - <xsl:apply-templates select="callout - |comment()[preceding-sibling::callout] - |processing-instruction()[preceding-sibling::callout]"/> - </dl> + <dl compact="compact"> + <xsl:apply-templates select="callout + |comment()[preceding-sibling::callout] + |processing-instruction()[preceding-sibling::callout]"/> + </dl> </xsl:otherwise> </xsl:choose> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |