This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
[docbook-apps] Custom layer and Chunking problem
- From: "aldib" <aldib at fuurou dot org>
- To: docbook-apps at lists dot oasis-open dot org
- Date: Fri, 19 Sep 2003 13:29:02
- Subject: [docbook-apps] Custom layer and Chunking problem
- Reply-to: "aldib" <aldib at fuurou dot org>
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
To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org.