From: <pau...@us...> - 2011-01-24 03:12:01
|
Author: paultremblay Date: 2011-01-24 04:11:53 +0100 (Mon, 24 Jan 2011) New Revision: 6658 Added: trunk/sandbox/paultremblay/docs/xsl/section.xsl Modified: trunk/sandbox/paultremblay/docs/xsl/document_stylesheet.xsl Log: Added templates to document sections; section.xsl provides the templates to document the stylesheet of the same name. Modified: trunk/sandbox/paultremblay/docs/xsl/document_stylesheet.xsl =================================================================== --- trunk/sandbox/paultremblay/docs/xsl/document_stylesheet.xsl 2011-01-24 02:06:49 UTC (rev 6657) +++ trunk/sandbox/paultremblay/docs/xsl/document_stylesheet.xsl 2011-01-24 03:11:53 UTC (rev 6658) @@ -10,6 +10,7 @@ <xsl:include href="bibliographic_fields.xsl"/> <xsl:include href="front_matter.xsl"/> <xsl:include href="toc.xsl"/> + <xsl:include href="section.xsl"/> <xsl:include href="bullet_list.xsl"/> <xsl:include href="enumerated_list.xsl"/> <xsl:include href="option_list.xsl"/> @@ -86,6 +87,15 @@ <xsl:call-template name="make-title"> <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">Section Attribute Sets</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for the section titles. + </block> + <xsl:apply-templates select="document('../../xsl_fo/section.xsl')/xsl:stylesheet"/> + + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> <xsl:with-param name="text">bullet list</xsl:with-param> </xsl:call-template> <block> Added: trunk/sandbox/paultremblay/docs/xsl/section.xsl =================================================================== --- trunk/sandbox/paultremblay/docs/xsl/section.xsl (rev 0) +++ trunk/sandbox/paultremblay/docs/xsl/section.xsl 2011-01-24 03:11:53 UTC (rev 6658) @@ -0,0 +1,72 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + <xsl:template match= "xsl:attribute-set[@name='default-section-title']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">None</xsl:with-param> + <xsl:with-param name="docutils">None</xsl:with-param> + </xsl:call-template> + <block> + Sets up the defaults for the section titles. The title should always have some text beneath it + to avoid widows and orphans; hence the keep-with-always property. + </block> + </xsl:template> + + + <xsl:template match= "xsl:attribute-set[@name='title-level1-block']" priority="3"> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">5</xsl:with-param> + <xsl:with-param name="text">title-level-block</xsl:with-param> + </xsl:call-template> + <block> + <xsl:text>:fo: fo:block</xsl:text> + </block> + <block first-line-indent="-9"> + <xsl:text>:docutils: section/title|section/section/title|etc.</xsl:text> + </block> + <block first-line-indent="-9"> + <xsl:text>:inherits: default-section-title</xsl:text> + </block> + <block> + The following attribute sets are identical in nature: + </block> + <block>- title-level1-block</block> + <block>- title-level2-block</block> + <block>- title-level3-block</block> + <block>- title-level4-block</block> + <block>- title-level5-block</block> + <block>- title-level6-block</block> + <block>- title-level7-block</block> + <block>- title-level8-block</block> + <block>- title-level9-block</block> + <block> + These attribute-sets format the titles of all sections. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='title-level2-block']| + xsl:attribute-set[@name='title-level3-block']| + xsl:attribute-set[@name='title-level4-block']| + xsl:attribute-set[@name='title-level5-block']| + xsl:attribute-set[@name='title-level6-block']| + xsl:attribute-set[@name='title-level7-block']| + xsl:attribute-set[@name='title-level8-block']| + xsl:attribute-set[@name='title-level9-block']" + + priority="3"/> + + <xsl:template match= "xsl:attribute-set[@name='title-number-inline']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:inline</xsl:with-param> + <xsl:with-param name="docutils">section/title/generated[@classes="sectnum]"</xsl:with-param> + </xsl:call-template> + <block> + Formats the title number generated by docutils. + </block> + </xsl:template> + +</xsl:stylesheet> Property changes on: trunk/sandbox/paultremblay/docs/xsl/section.xsl ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native |