123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- <?xml version='1.0' encoding='ISO-8859-1'?>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fo="http://www.w3.org/1999/XSL/Format"
- version="1.0">
-
-
- <xsl:attribute-set name="list.block.spacing">
- <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
- <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
- <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
- <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
- <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
- <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
- </xsl:attribute-set>
-
- <xsl:attribute-set name="list.item.spacing">
- <xsl:attribute name="space-before.optimum">0.4em</xsl:attribute>
- <xsl:attribute name="space-before.minimum">0.2em</xsl:attribute>
- <xsl:attribute name="space-before.maximum">0.6em</xsl:attribute>
- </xsl:attribute-set>
-
- <xsl:attribute-set name="itemizedlist.properties"
- use-attribute-sets="list.block.properties">
- <xsl:attribute name="text-align">left</xsl:attribute>
- </xsl:attribute-set>
-
- <xsl:param name="variablelist.as.blocks" select="1"/>
-
- <xsl:param name="variablelist.max.termlength">35</xsl:param>
-
- {docbook-xsl}
- <xsl:template match="varlistentry" mode="vl.as.blocks">
- <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
- <xsl:choose>
- <xsl:when test="ancestor::variablelist/@role = 'materials'">
- <fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing"
- keep-together.within-column="always" font-weight="bold"
- keep-with-next.within-column="always" text-align="left">
- <xsl:text>• </xsl:text>
- <xsl:apply-templates select="term"/>
- </fo:block>
- <fo:block text-align="left"
- keep-together.within-column="always"
- keep-with-previous.within-column="always">
- <xsl:apply-templates select="listitem"/>
- </fo:block>
- </xsl:when>
- <xsl:otherwise>
- <fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing"
- keep-together.within-column="always"
- keep-with-next.within-column="always" margin-left="1em">
- <xsl:apply-templates select="term"/>
- </fo:block>
- <fo:block margin-left="2em">
- <xsl:apply-templates select="listitem"/>
- </fo:block>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- {docbook-xsl}
- <xsl:template match="segmentedlist">
- <xsl:variable name="id">
- <xsl:call-template name="object.id"/>
- </xsl:variable>
- <fo:list-block id="{$id}" provisional-distance-between-starts="12em"
- provisional-label-separation="1em"
- keep-together.within-column="always">
- <xsl:choose>
- <xsl:when test="ancestor::appendix[@id='appendixc']">
- <xsl:attribute name="space-before.optimum">0.2em</xsl:attribute>
- <xsl:attribute name="space-before.minimum">0em</xsl:attribute>
- <xsl:attribute name="space-before.maximum">0.4em</xsl:attribute>
- <xsl:attribute name="space-after.optimum">0.2em</xsl:attribute>
- <xsl:attribute name="space-after.minimum">0em</xsl:attribute>
- <xsl:attribute name="space-after.maximum">0.4em</xsl:attribute>
- <xsl:attribute name="keep-with-previous.within-column">always</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="space-before.optimum">0.4em</xsl:attribute>
- <xsl:attribute name="space-before.minimum">0.2em</xsl:attribute>
- <xsl:attribute name="space-before.maximum">0.6em</xsl:attribute>
- <xsl:attribute name="space-after.optimum">0.4em</xsl:attribute>
- <xsl:attribute name="space-after.minimum">0.2em</xsl:attribute>
- <xsl:attribute name="space-after.maximum">0.6em</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:apply-templates select="seglistitem/seg"/>
- </fo:list-block>
- </xsl:template>
-
- {docbook-xsl}
- <xsl:template match="seglistitem/seg">
- <xsl:variable name="id">
- <xsl:call-template name="object.id"/>
- </xsl:variable>
- <xsl:variable name="segnum" select="count(preceding-sibling::seg)+1"/>
- <xsl:variable name="seglist" select="ancestor::segmentedlist"/>
- <xsl:variable name="segtitles" select="$seglist/segtitle"/>
- <fo:list-item xsl:use-attribute-sets="compact.list.item.spacing">
- <fo:list-item-label end-indent="label-end()" text-align="start">
- <fo:block>
- <fo:inline font-weight="bold">
- <xsl:apply-templates select="$segtitles[$segnum=position()]"
- mode="segtitle-in-seg"/>
- <xsl:text>:</xsl:text>
- </fo:inline>
- </fo:block>
- </fo:list-item-label>
- <fo:list-item-body start-indent="body-start()">
- <fo:block id="{$id}">
- <xsl:apply-templates/>
- </fo:block>
- </fo:list-item-body>
- </fo:list-item>
- </xsl:template>
-
- <xsl:template match="simplelist">
- <fo:block xsl:use-attribute-sets="simplelist.properties">
- <xsl:apply-templates mode="condensed"/>
- </fo:block>
- </xsl:template>
-
- <xsl:template match="member" mode="condensed">
- <fo:block xsl:use-attribute-sets="simplelist.properties">
- <xsl:call-template name="simple.xlink">
- <xsl:with-param name="content">
- <xsl:apply-templates/>
- </xsl:with-param>
- </xsl:call-template>
- </fo:block>
- </xsl:template>
-
- <xsl:attribute-set name="simplelist.properties">
- <xsl:attribute name="keep-with-previous.within-column">always</xsl:attribute>
- <xsl:attribute name="space-before.optimum">0em</xsl:attribute>
- <xsl:attribute name="space-before.minimum">0em</xsl:attribute>
- <xsl:attribute name="space-before.maximum">0.2em</xsl:attribute>
- </xsl:attribute-set>
- </xsl:stylesheet>
|