It looks like the existing toc.line entry in the customization file does do
some customization for appendices and chapters. Could that be interfering
with the toc.line.properties attributes?
<xsl:template name="toc.line">
<xsl:param name="toc-context" select="NOTANODE"/>
<xsl:variable name="id">
<xsl:call-template name="object.id"/>
</xsl:variable>
<xsl:variable name="label">
<xsl:apply-templates select="." mode="label.markup"/>
</xsl:variable>
<fo:block xsl:use-attribute-sets="toc.line.properties">
<fo:inline keep-with-next.within-line="always">
<fo:basic-link internal-destination="{$id}">
<xsl:if test="self::appendix or self::chapter">
<xsl:call-template name="gentext">
<xsl:with-param name="key" select="local-name()"/>
</xsl:call-template>
<xsl:text> </xsl:text>
</xsl:if>
<xsl:if test="$label != ''">
<xsl:copy-of select="$label"/>
<xsl:value-of select="$autotoc.label.separator"/>
</xsl:if>
<xsl:apply-templates select="." mode="titleabbrev.markup"/>
</fo:basic-link>
</fo:inline>
<fo:inline keep-together.within-line="always">
<xsl:text> </xsl:text>
<fo:leader leader-pattern="dots"
leader-pattern-width="3pt"
leader-alignment="reference-area"
keep-with-next.within-line="always"/>
<xsl:text> </xsl:text>
<fo:basic-link internal-destination="{$id}">
<fo:page-number-citation ref-id="{$id}"/>
</fo:basic-link>
</fo:inline>
</fo:block>
</xsl:template>
<xsl:attribute-set name="toc.line.properties">
<xsl:attribute name="font-size">10pt</xsl:attribute>
<xsl:attribute name="font-weight">
<xsl:choose>
<xsl:when test="self::chapter | self::preface | self::appendix">bold
</xsl:when>
<xsl:otherwise>normal</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:attribute-set>
On Thu, Oct 16, 2014 at 8:25 AM, Fekete, Róbert <[email protected]>
wrote:
> Hi,
>
> Your customization with Nick's correction should be working, that's what
> we also use. Do you have any other ToC-related customization that could
> interfere?
>
> Robert
>
> On Thu, Oct 16, 2014 at 2:07 PM, Janice Manwiller <[email protected]>
> wrote:
>
>> Nope, that didn't do it. Still no bold for the chapter TOC entries.
>>
>> On Thu, Oct 16, 2014 at 7:57 AM, Wood Nick <[email protected]>
>> wrote:
>>
>>> Janice,
>>>
>>>
>>>
>>> Try <*xsl:*choose/>.
>>>
>>>
>>>
>>> Regards
>>>
>>>
>>>
>>> Nick
>>>
>>>
>>>
>>> *From:* Janice Manwiller [mailto:[email protected]]
>>> *Sent:* Thursday, October 16, 2014 1:45 PM
>>> *To:* [email protected]
>>> *Subject:* [docbook-apps] Trouble formatting PDF TOC entries
>>>
>>>
>>>
>>> I'm trying to update the formatting of a PDF TOC. I mostly want to add
>>> additional space above and bold the chapter entries.
>>>
>>>
>>>
>>> I found the following sample for toc.line.properties in the DocBook XSL
>>> reference, and as a test added it to my FO stylesheet.
>>>
>>>
>>>
>>> <xsl:attribute-set name="toc.line.properties">
>>>
>>> <xsl:attribute name="font-size">10pt</xsl:attribute>
>>>
>>> <xsl:attribute name="font-weight">
>>>
>>> <xsl:when test="self::chapter | self::preface |
>>> self::appendix">bold</xsl:when>
>>>
>>> <xsl:otherwise>normal</xsl:otherwise>
>>>
>>> </xsl:attribute>
>>>
>>> </xsl:attribute-set>
>>>
>>> According to the guide, this should make all entries 10pt and chapter
>>> entries bold.
>>>
>>>
>>>
>>> However, when I try to generate the DocBook output using our maven
>>> docbkx tool, it doesn't generate at all, and I get an error indicating that
>>> a "when" element must always be enclosed by a "choose" element.
>>>
>>>
>>>
>>> If I add the choose element, like:
>>>
>>> <xsl:attribute-set name="toc.line.properties">
>>>
>>> <xsl:attribute name="font-size">10pt</xsl:attribute>
>>>
>>> <xsl:attribute name="font-weight">
>>>
>>> <choose>
>>>
>>> <xsl:when test="self::chapter | self::preface |
>>> self::appendix">bold</xsl:when>
>>>
>>> <xsl:otherwise>normal</xsl:otherwise>
>>>
>>> </choose>
>>>
>>> </xsl:attribute>
>>>
>>> </xsl:attribute-set>
>>>
>>> then the output generates, but there is no effect on the TOC
>>> formatting. The chapter entries aren't bold.
>>>
>>>
>>>
>>> Any ideas on how to get this to work?
>>>
>>>
>>>
>>> Thanks,
>>>
>>>
>>>
>>> Janice
>>>
>>
>>
>>
>> --
>> Janice Manwiller
>> Principal Technical Writer
>> Sqrrl Data, Inc.
>> www.sqrrl.com | @SqrrlData
>>
>
>
--
Janice Manwiller
Principal Technical Writer
Sqrrl Data, Inc.
www.sqrrl.com | @SqrrlData