← Prev in month
← Prev in thread
A Few Stylesheet Title Customization Problems
docbook-rnc-5.0cr1 xsl-1.72.0 oxygen-8.1.0 (eclipse-3.2.1 plugin) As I put the finishing touches on the enterprise …/xhtml/profile-chunk.xsl stylesheet customizations (css conformance) I have encountered a few title problems: <xsl:template name="division.title"> <!-- set, book, part --> <xsl:param name="node" select="."/> <p> <xsl:attribute name="class">page-title</xsl:attribute> <xsl:call-template name="anchor"> <xsl:with-param name="node" select="$node"/> <xsl:with-param name="conditional" select="0"/> </xsl:call-template> <xsl:apply-templates select="$node" mode="object.title.markup"> <xsl:with-param name="allow-anchors" select="1"/> </xsl:apply-templates> </p> </xsl:template> No equivalent division.subtitle; additionally, unable to successfully wrap division.title as with component.title/component.subtitle. The templates: <xsl:template match="partintro/title" mode="partintro.title.mode"> <h2> <xsl:apply-templates/> </h2> </xsl:template> and <xsl:template match="partintro/subtitle" mode="partintro.title.mode"> <h3> <i><xsl:apply-templates/></i> </h3> </xsl:template> transform to <h1> elements regardless of <h2> and <h3> or applying css-conformant elements. <xsl:template name="component.title"> <!-- dedication, preface, chapter, appendix, article, bibliography, glossary, index --> <xsl:comment>START: PAGE TITLE AREA</xsl:comment> <p class="page-title"> <xsl:apply-imports/> </p> <xsl:comment>END: PAGE TITLE AREA </xsl:comment> </xsl:template> The above template does not work with partintro titles and the dedication body implements the same page-title class as the dedication title. <xsl:template name="component.subtitle"> <!-- dedication, preface, chapter, appendix, article, bibliography, glossary, index --> <xsl:comment>START: PAGE SUBTITLE AREA</xsl:comment> <p class="foo-large"> <xsl:apply-imports/> </p> <xsl:comment>END: PAGE SUBTITLE AREA </xsl:comment> </xsl:template> Same issues as with component.title. A couple of suggestions: 1) templates division.title/division.subtitle should behave as component.title/component.subtitle: a simple wrapper to replace the <h1>, <h2> and <h3> tags with the css classes. 2) role attributes be applied to <title> elements similar to <para> and <phrase> to allow overriding with css classes. If I am incorrectly selecting, extending or overriding templates please advise. Ray
← Prev in month
← Prev in thread