From: <pau...@us...> - 2011-02-19 19:05:18
|
Author: paultremblay Date: 2011-02-19 20:05:10 +0100 (Sat, 19 Feb 2011) New Revision: 6917 Modified: trunk/sandbox/paultremblay/docutilsToFo/xsl_fo/option_list.xsl Log: Added block and attribute sets for description of the options. Modified: trunk/sandbox/paultremblay/docutilsToFo/xsl_fo/option_list.xsl =================================================================== --- trunk/sandbox/paultremblay/docutilsToFo/xsl_fo/option_list.xsl 2011-02-19 19:03:16 UTC (rev 6916) +++ trunk/sandbox/paultremblay/docutilsToFo/xsl_fo/option_list.xsl 2011-02-19 19:05:10 UTC (rev 6917) @@ -34,7 +34,7 @@ <xsl:attribute name="end-indent">label-end()</xsl:attribute> </xsl:attribute-set> - <!--for the block in the options label fo:list-item-lable/block. Element is fo:block.`doc`--> + <!--for the block in the options label fo:list-item-lable/block. Element is fo:block.--> <xsl:attribute-set name="option-list-item-label-block"> </xsl:attribute-set> @@ -95,9 +95,17 @@ <!--for the block for paragraphs describing options. This attribute set for the first of such paragraphs Element is fo:block.--> - <xsl:attribute-set name="option-list-description-first-block" use-attribute-sets="option-list-description-block"> + <xsl:attribute-set name="option-list-description-block"> <xsl:attribute name="space-before">0pt</xsl:attribute> </xsl:attribute-set> + + <xsl:attribute-set name="option-list-paragraph-block"> + <xsl:attribute name="space-before">0pt</xsl:attribute> + </xsl:attribute-set> + + <xsl:attribute-set name="option-list-first-paragraph-block" use-attribute-sets="option-list-paragraph-block"> + <xsl:attribute name="space-before">0pt</xsl:attribute> + </xsl:attribute-set> <xsl:template match="option_list"> @@ -216,17 +224,19 @@ </xsl:template> <xsl:template match="option_list_item/description" mode="definition"> - <xsl:apply-templates mode="definition"/> + <fo:block role="option-list-description" xsl:use-attribute-sets="option-list-description-first-block"> + <xsl:apply-templates mode="definition"/> + </fo:block> </xsl:template> <xsl:template match="option_list_item/description/paragraph[1]" mode="definition" priority="2"> - <fo:block role="option-list-description" xsl:use-attribute-sets="option-list-description-first-block"> + <fo:block role="option-list-description" xsl:use-attribute-sets="option-list-first-paragraph-block"> <xsl:apply-templates mode="definition"/> </fo:block> </xsl:template> <xsl:template match="option_list_item/description/paragraph" mode="definition" priority="1"> - <fo:block role="option-list-description" xsl:use-attribute-sets="option-list-description-block"> + <fo:block role="option-list-description" xsl:use-attribute-sets="option-list-paragraph-block"> <xsl:apply-templates mode="definition"/> </fo:block> </xsl:template> |