[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: RE: DOCBOOK-APPS: Customization Problem - Chapter TOCs
The basic
problem is that the chunking stylesheets override the chapter templates (because
it's a chunk) and use <xsl:apply-imports/> to call the template in
html\component.xsl. If you put a customization on that template, it will
break the chunking code. I think that in the latest version of the
stylesheets, Norm has changed the chunking mechanism to allow customization of
chunked elements.
Jeff
Beal
-----Original Message-----
From: Nicholas Atkinson [mailto:nik@casawana.com] Sent: Tuesday, December 03, 2002 9:33 AM To: docbook-apps@lists.oasis-open.org Subject: DOCBOOK-APPS: Customization Problem - Chapter TOCs I have a number of customizations which I use when
generating HTML Help from my docbook documents.
However there is one customization which causes
problems when I add it to the customization layer, which works fine (in the v
1.56.1 transforms) when I modify html\component.xsl directly. I would like
to resolve this if possible as modifying the transforms themselves is, well,
messy!
Basically I want the chapter toc to appear after
the text of the chapter (before any subsections of course) rather than
before it. I already have a customization which gets rid of the
"Table of Contents" text. The desired end result is that links to child
sections appear at the bottom of the page rather than the top.
If I change this template in
html\component.xsl:
<xsl:template match="chapter">
<div class="{name(.)}"> <xsl:if test="$generate.id.attributes != 0"> <xsl:attribute name="id"> <xsl:call-template name="object.id"/> </xsl:attribute> </xsl:if> <xsl:call-template
name="component.separator"/>
<xsl:call-template name="chapter.titlepage"/> <xsl:variable
name="toc.params">
<xsl:call-template name="find.path.params"> <xsl:with-param name="table" select="normalize-space($generate.toc)"/> </xsl:call-template> </xsl:variable> <xsl:if test="contains($toc.params, 'toc')"> <xsl:call-template name="component.toc"> <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/> </xsl:call-template> </xsl:if> <xsl:apply-templates/> <xsl:call-template name="process.footnotes"/> </div> </xsl:template> to this:
<xsl:template match="chapter">
<div class="{name(.)}"> <xsl:if test="$generate.id.attributes != 0"> <xsl:attribute name="id"> <xsl:call-template name="object.id"/> </xsl:attribute> </xsl:if> <xsl:call-template
name="component.separator"/>
<xsl:call-template name="chapter.titlepage"/>
<xsl:apply-templates/> <xsl:variable name="toc.params"> <xsl:call-template name="find.path.params"> <xsl:with-param name="table" select="normalize-space($generate.toc)"/> </xsl:call-template> </xsl:variable> <xsl:if test="contains($toc.params, 'toc')"> <xsl:call-template name="component.toc"> <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/> </xsl:call-template> </xsl:if> <xsl:call-template name="process.footnotes"/> </div> </xsl:template> then I get what I want. (All I have
done is move the <xsl:apply-templates/> up).
However if I put this template, or the original of
the template, in my customization layer and use the original html\component.xsl,
then the chunking goes all wrong.
Does anyone know why this is the case, or what the
preferred way of achieving such behaviour might be?
nik
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC