[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Title Page Layout in FO
Gad, I thought I tested all my examples, but I certainly didn't test that one! Here is a working version of that customization: <xsl:template name="chapappendix.title"> <xsl:param name="node" select="."/> <xsl:variable name="id"> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="$node"/> </xsl:call-template> </xsl:variable> <fo:block id="{$id}" xsl:use-attribute-sets="chap.label.properties"> <xsl:call-template name="gentext"> <xsl:with-param name="key"> <xsl:choose> <xsl:when test="$node/self::chapter">chapter</xsl:when> <xsl:when test="$node/self::appendix">appendix</xsl:when> </xsl:choose> </xsl:with-param> </xsl:call-template> <xsl:text> </xsl:text> <xsl:apply-templates select="$node" mode="label.markup"/> </fo:block> <fo:block xsl:use-attribute-sets="chap.title.properties"> <xsl:apply-templates select="$node" mode="title.markup"/> </fo:block> </xsl:template> Thanks for pointing this out. I'm going to try to get this fix into the print edition before any orders are placed. Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: "Thomas Schraitle" <tom_schr@web.de> To: <docbook-apps@lists.oasis-open.org> Cc: "Bob Stayton" <bobs@sagehill.net> Sent: Sunday, February 27, 2005 11:05 AM Subject: Re: [docbook-apps] Title Page Layout in FO > Hi, > > On Sunday, 27. February 2005 19:13, Bob Stayton wrote: > > There is an example for this in: > > http://www.sagehill.net/docbookxsl/TitleFontSizes.html#ChapterTitles > > Thanks, Bob. I overlooked that in your book, I had only the second edition > in front of me. Obviously it would be better if I had checked the third > release too. :) > > Unfortunatly xsltproc complains about the misplaced xsl:choose inside the > xsl:call-template: > > <xsl:template name="chapappendix.title"> > ... > <xsl:call-template name="gentext"> > <xsl:choose><!-- xsltproc complains here --> > <xsl:when test="self::chapter"> > <xsl:with-param name="key" select="'chapter'"/> > </xsl:when> > <xsl:when test="self::appendix"> > <xsl:with-param name="key" select="'appendix'"/> > </xsl:when> > </xsl:choose> > </xsl:call-template> > ... > </xsl:template> > > I changed that order of the xsl:with-param and xsl:choose; the > self::appendix and self::chapter didn't work either so I changed that > too: > > <xsl:template name="chapappendix.title"> > ... > <xsl:call-template name="gentext"> > <xsl:with-param name="key"> > <xsl:choose> > <xsl:when test="local-name($node)='chapter'"> > <xsl:text>chapter</xsl:text> > </xsl:when> > <xsl:when test="local-name($node)='appendix'"> > <xsl:text>appendix</xsl:text> > </xsl:when> > </xsl:choose> > </xsl:with-param> > </xsl:call-template> > ... > </xsl:template> > > It seems that xsltproc is right, or do you see any errors in my above > code? > Apart from these small issues it works like a charm. :) > > Thanks, > Tom > > -- > Thomas Schraitle <tom_schr@web.de> > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]