[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] table customization problem
Hi Mita, I had a similar problem while transforming to a html file. I'd differ between two kinds of table. My docbook xml file looks like that: <section role="table1"> <title>ABC</title> <informaltable> ... </informaltable> </section> <section role="table2"> <title>DEF</title> <informaltable> ... </informaltable> </section> With this extension in customization layer a surrounding div-tag has not only the class "table" but also the class named with the role attribute. The output is <div class="table table1"> <xsl:template match="section"> <xsl:variable name="depth" select="count(ancestor::section)+1"/> <div> <xsl:attribute name="class"> <xsl:value-of select="name(.)" /> <xsl:if test="@role"> <xsl:value-of select="concat(' ', @role)" /> </xsl:if> </xsl:attribute> <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"/> </div> </xsl:template> In my css file I added the formating of the two tables like this. div.table1 table { ... } div.table2 table { ... } I hope that helps you. Regards Holger
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]