[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook] background colour and font of the table.
Hi,Problem 1: Are you using DocBook 5 and the namespaced stylesheets? If so, then all references to element names in match and select attributes in your customization must have the d: namespace prefix. In this case, d:tgroup and d:row.
Problem 2: Add this to your customization layer: <xsl:attribute-set name="table.table.properties"> <xsl:attribute name="text-align">start</xsl:attribute> </xsl:attribute-set> Now table cells will be left-aligned instead of justified.BTW, I recommend you use the docbook-apps mailing list for questions about stylesheets. The docbook list is really for schema questions, although that isn't obvious.
Bob Stayton Sagehill Enterprises bobs@sagehill.net On 2/11/2014 11:19 AM, anmol gupta wrote:
Hi, *Problem 1:* I wanted alternate rows of my table to be differently colored. So, i added a template to my customization layer i found at http://www.sagehill.net/docbookxsl/TableTemplateCust.html#TableContinuedLabel <xsl:template name="table.row.properties"> <xsl:variable name="tabstyle"> <xsl:call-template name="tabstyle"/> </xsl:variable> <xsl:variable name="bgcolor"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'bgcolor'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="rownum"> <xsl:number from="tgroup" count="row"/> </xsl:variable> <xsl:choose> <xsl:when test="$bgcolor != ''"> <xsl:attribute name="background-color"> <xsl:value-of select="$bgcolor"/> </xsl:attribute> </xsl:when> <xsl:when test="$tabstyle = 'striped'"> <xsl:if test="$rownum mod 2 = 0"> <xsl:attribute name="background-color">#EEEEEE</xsl:attribute> </xsl:if> </xsl:when> </xsl:choose> </xsl:template> After this i set the tabstyle attribute of the table to "striped". But nothing happened. What am i doing wrong? Also What colour does #EEEEEE represent? *Problem 2:* In the table suppose in cell there is a lot of text with long words, then alignment of text gets disturbed. I can see lot of spaces between two small words to accommodate the big word from next line like | abd ads sbd | | AnmolGupta ads as | It should have been like | abd ads sbd | | AnmolGupta ads as | How can i do this? Thanks and Regards, ..Anmol
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]