Page 1 of 1

XSL template for chapter titles

Posted: Fri May 06, 2016 8:02 pm
by surangamas
Hi: I was wondering if anyone knows which XSL template is responsible for generating and outputting chapter titles to PDF? What I am trying to do is to create a value for the outputclass for a particular chapter's title wherein if the user specifies that value in the outputclass field of the chapter title, that chapter's title would be styled differently from other chapter titles.

I am trying to create a condition using

Code: Select all

<xsl:choose>...<xsl:when test="*[contains (@class ' topic/title ')]/@outputclass = '@value@'" >......<xsl:otherwise>...
The problem is, I don't know what to put between <xsl:otherwise> and </xsl:otherwise>, does anyone know? Thanks.

Re: XSL template for chapter titles

Posted: Mon May 09, 2016 3:39 pm
by Radu
Hi,

The XSLT stylesheet:

OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\org.dita.pdf2\xsl\fo\commons.xsl

seems to have a template:

<xsl:template match="*[contains(@class,' topic/topic ')]/*[contains(@class,' topic/title ')]">

but there seems to be special processing when a chapter title is presented in the PDF by default and that processing is done by the template:

<xsl:template match="*" mode="createMiniToc">.

So those are probably the places where you can try to add some xsl:messages, see how the templates are called and make customizations.

Regards,
Radu