Changeset 1663ed9 for stylesheets/print
- Timestamp:
- 08/09/2004 10:01:51 PM (20 years ago)
- Branches:
- 6.0
- Children:
- d75063f
- Parents:
- adca1dd1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
stylesheets/print/lfs-pagesetup.xsl
radca1dd1 r1663ed9 18 18 </xsl:attribute> 19 19 </xsl:attribute-set> 20 21 <!-- Skip numeraration for sections with empty title --> 22 <xsl:template match="sect2|sect3|sect4|sect5" mode="label.markup"> 23 <xsl:if test="string-length(title) > 0"> 24 <!-- label the parent --> 25 <xsl:variable name="parent.label"> 26 <xsl:apply-templates select=".." mode="label.markup"/> 27 </xsl:variable> 28 <xsl:if test="$parent.label != ''"> 29 <xsl:apply-templates select=".." mode="label.markup"/> 30 <xsl:apply-templates select=".." mode="intralabel.punctuation"/> 31 </xsl:if> 32 <xsl:choose> 33 <xsl:when test="@label"> 34 <xsl:value-of select="@label"/> 35 </xsl:when> 36 <xsl:when test="$section.autolabel != 0"> 37 <xsl:choose> 38 <xsl:when test="local-name(.) = 'sect2'"> 39 <xsl:choose> 40 <!-- If the first sect2 isn't numbered, renumber the remainig sections --> 41 <xsl:when test="string-length(../sect2[1]/title) = 0"> 42 <xsl:variable name="totalsect2"> 43 <xsl:number count="sect2"/> 44 </xsl:variable> 45 <xsl:number value="$totalsect2 - 1"/> 46 </xsl:when> 47 <xsl:otherwise> 48 <xsl:number count="sect2"/> 49 </xsl:otherwise> 50 </xsl:choose> 51 </xsl:when> 52 <xsl:when test="local-name(.) = 'sect3'"> 53 <xsl:number count="sect3"/> 54 </xsl:when> 55 <xsl:when test="local-name(.) = 'sect4'"> 56 <xsl:number count="sect4"/> 57 </xsl:when> 58 <xsl:when test="local-name(.) = 'sect5'"> 59 <xsl:number count="sect5"/> 60 </xsl:when> 61 <xsl:otherwise> 62 <xsl:message>label.markup: this can't happen!</xsl:message> 63 </xsl:otherwise> 64 </xsl:choose> 65 </xsl:when> 66 </xsl:choose> 67 </xsl:if> 68 </xsl:template> 69 70 <!-- Drop the trailing punctuation if title is empty --> 71 <xsl:template match="section|sect1|sect2|sect3|sect4|sect5|simplesect 72 |bridgehead" 73 mode="object.title.template"> 74 <xsl:choose> 75 <xsl:when test="$section.autolabel != 0"> 76 <xsl:if test="string-length(title) > 0"> 77 <xsl:call-template name="gentext.template"> 78 <xsl:with-param name="context" select="'title-numbered'"/> 79 <xsl:with-param name="name"> 80 <xsl:call-template name="xpath.location"/> 81 </xsl:with-param> 82 </xsl:call-template> 83 </xsl:if> 84 </xsl:when> 85 <xsl:otherwise> 86 <xsl:call-template name="gentext.template"> 87 <xsl:with-param name="context" select="'title-unnumbered'"/> 88 <xsl:with-param name="name"> 89 <xsl:call-template name="xpath.location"/> 90 </xsl:with-param> 91 </xsl:call-template> 92 </xsl:otherwise> 93 </xsl:choose> 94 </xsl:template> 20 95 21 96 <!-- Header --> … … 118 193 <!-- How render a variablelist --> 119 194 <xsl:param name="variablelist.as.blocks" select="1"/> 195 196 <!-- Adding space before segmentedlist --> 197 <xsl:template match="segmentedlist"> 198 <xsl:variable name="presentation"> 199 <xsl:call-template name="pi-attribute"> 200 <xsl:with-param name="pis" 201 select="processing-instruction('dbfo')"/> 202 <xsl:with-param name="attribute" select="'list-presentation'"/> 203 </xsl:call-template> 204 </xsl:variable> 205 <xsl:choose> 206 <xsl:when test="$presentation = 'table'"> 207 <xsl:apply-templates select="." mode="seglist-table"/> 208 </xsl:when> 209 <xsl:when test="$presentation = 'list'"> 210 <fo:block space-before.minimum="0.4em" space-before.optimum="0.6em" 211 space-before.maximum="0.8em"> 212 <xsl:apply-templates/> 213 </fo:block> 214 </xsl:when> 215 <xsl:when test="$segmentedlist.as.table != 0"> 216 <xsl:apply-templates select="." mode="seglist-table"/> 217 </xsl:when> 218 <xsl:otherwise> 219 <fo:block space-before.minimum="0.4em" space-before.optimum="0.6em" 220 space-before.maximum="0.8em"> 221 <xsl:apply-templates/> 222 </fo:block> 223 </xsl:otherwise> 224 </xsl:choose> 225 </xsl:template> 226 120 227 121 228 </xsl:stylesheet>
Note:
See TracChangeset
for help on using the changeset viewer.