[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Custom layer and Chunking problem
Hi, I'm trying to write a CSS to apply to the HTML generated by the docbook xslt. I want to be able to use ID classes for a finer grained control so I wrote a customization layer that puts the id attribute of my docbook elements into the class attribute of the HTML element. The layer looks like: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:import href="../../docbook/docbook-xsl-1.62.0/html/chunk.xsl"/> <xsl:template match="section"> <xsl:variable name="depth" select="count(ancestor::section)+1"/> <xsl:element name="div"> <xsl:choose> <xsl:when test="@id"> <xsl:attribute name="class"><xsl:value-of select="@id"/></xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name="class"><xsl:value-of select="name(.)"/></xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:call-template name="language.attribute"/> <xsl:call-template name="section.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') and $depth <= $generate.section.toc.level"> <xsl:call-template name="section.toc"> <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/> </xsl:call-template> <xsl:call-template name="section.toc.separator"/> </xsl:if> <xsl:apply-templates/> <xsl:call-template name="process.chunk.footnotes"/> </xsl:element> </xsl:template> </xsl:stylesheet> My problems are: 1. I want to apply the same principle to any docbook elements, do i need to overwite every template? 2. When i use my layer, the processor does not chunk the document anymore. At run time I pass: saxon.extensions=1 use.extensions=1 draft.mode=no tablecolumns.extension=0 html.stylesheet=style.css to my Saxon 6.5.2 engine. Any help would be greatly apreciated. Thanks Alessandro
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]