docbook-apps

[docbook-apps] table.cell.properties clobbering colsep/rowsep/cell borders

  • 1.  [docbook-apps] table.cell.properties clobbering colsep/rowsep/cell borders

    Posted 02-02-2012 18:52

    Hello,

    I'm trying to set up my table styles for a document. Basically, I want the
    heading row of each table to be gray. However, using this template (which I
    pulled from a sample), it kills most of the other settings for the tables in
    the document, particularly the colsep/rowsep cell borders.

    <xsl:template name="table.cell.properties">
    <xsl:param name="bgcolor.pi" select="''"/>
    <xsl:param name="rowsep.inherit" select="1"/>
    <xsl:param name="colsep.inherit" select="1"/>
    <xsl:param name="valign.inherit" select="1"/>
    <xsl:param name="align.inherit" select="1"/>
    <xsl:param name="char.inherit" select="1"/>

    <xsl:variable name="tabstyle">
    <xsl:call-template name="tabstyle"/>
    </xsl:variable>
    <xsl:variable name="bgcolor">
    <xsl:choose>
    <xsl:when test="ancestor::thead">#CCCCCC</xsl:when>
    <xsl:when test="$bgcolor.pi != ''"><xsl:value-of
    select="$bgcolor.pi"/></xsl:when>
    <xsl:otherwise>inherit</xsl:otherwise>
    </xsl:choose>
    </xsl:variable>

    <xsl:if test="$bgcolor != ''">
    <xsl:attribute name="background-color">
    <xsl:value-of select="$bgcolor"/>
    </xsl:attribute>
    </xsl:if>

    </xsl:template>


    I take it I need to modify the default table.cell.properties template from
    table.xsl rather than just using this miniature one... but I can't seem to
    understand how to incorporate the thead background color piece into that
    template.

    Thanks,
    -dan
    --
    View this message in context: http://old.nabble.com/table.cell.properties-clobbering-colsep-rowsep-cell-borders-tp33252306p33252306.html
    Sent from the docbook apps mailing list archive at Nabble.com.