<xsl:template name="finaltd">
<xsl:param name="spans"/>
+ <xsl:param name="col" select="0"/>
<xsl:if test="$spans != ''">
<xsl:choose>
<xsl:when test="starts-with($spans,'0:')">
- <xsl:call-template name="empty.table.cell"/>
+ <xsl:call-template name="empty.table.cell">
+ <xsl:with-param name="colnum" select="$col"/>
+ </xsl:call-template>
</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
<xsl:call-template name="finaltd">
<xsl:with-param name="spans" select="substring-after($spans,':')"/>
+ <xsl:with-param name="col" select="$col+1"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:param name="entry" select="."/>
<xsl:choose>
+ <xsl:when test="$entry/@spanname">
+ <xsl:variable name="spanname" select="$entry/@spanname"/>
+ <xsl:variable name="spanspec"
+ select="$entry/ancestor::tgroup/spanspec[@spanname=$spanname]"/>
+ <xsl:variable name="colspec"
+ select="$entry/ancestor::tgroup/colspec[@colname=$spanspec/@namest]"/>
+ <xsl:call-template name="colspec.colnum">
+ <xsl:with-param name="colspec" select="$colspec"/>
+ </xsl:call-template>
+ </xsl:when>
<xsl:when test="$entry/@colname">
<xsl:variable name="colname" select="$entry/@colname"/>
<xsl:variable name="colspec"
<xsl:template name="calculate.colspan">
<xsl:param name="entry" select="."/>
- <xsl:variable name="namest" select="$entry/@namest"/>
- <xsl:variable name="nameend" select="$entry/@nameend"/>
+ <xsl:variable name="spanname" select="$entry/@spanname"/>
+ <xsl:variable name="spanspec"
+ select="$entry/ancestor::tgroup/spanspec[@spanname=$spanname]"/>
+
+ <xsl:variable name="namest">
+ <xsl:choose>
+ <xsl:when test="@spanname">
+ <xsl:value-of select="$spanspec/@namest"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$entry/@namest"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="nameend">
+ <xsl:choose>
+ <xsl:when test="@spanname">
+ <xsl:value-of select="$spanspec/@nameend"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$entry/@nameend"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
<xsl:variable name="scol">
<xsl:call-template name="colspec.colnum">
<xsl:value-of select="$ecol - $scol + 1"/>
</xsl:template>
+<xsl:template name="X.calculate.rowsep">
+ <xsl:param name="entry" select="."/>
+ <xsl:param name="colnum" select="0"/>
+
+ <xsl:choose>
+ <xsl:when test="$entry/ancestor::table/@frame = 'all'
+ or $entry/ancestor::informaltable/@frame = 'all'">1</xsl:when>
+ <xsl:when test="$entry/@rowsep">
+ <xsl:value-of select="$entry/@rowsep"/>
+ </xsl:when>
+ <xsl:when test="$entry/ancestor::row[1]/@rowsep">
+ <xsl:value-of select="$entry/ancestor::row[1]/@rowsep"/>
+ </xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="calculate.rowsep">
+ <xsl:param name="entry" select="."/>
+ <xsl:param name="colnum" select="0"/>
+
+<!--
+ <xsl:text>[</xsl:text>
+ <xsl:value-of select="$colnum"/>
+ <xsl:text>]</xsl:text>
+-->
+
+ <xsl:choose>
+ <xsl:when test="$entry/ancestor::table/@frame = 'all'
+ or $entry/ancestor::informaltable/@frame = 'all'">
+ <xsl:value-of select="1"/>
+ </xsl:when>
+ <xsl:when test="$entry/@rowsep">
+ <xsl:value-of select="$entry/@rowsep"/>
+ </xsl:when>
+ <xsl:when test="$entry/ancestor::row[1]/@rowsep">
+ <xsl:value-of select="$entry/ancestor::row[1]/@rowsep"/>
+ </xsl:when>
+ <xsl:when test="$entry/@spanname">
+ <xsl:variable name="spanname" select="$entry/@spanname"/>
+ <xsl:variable name="spanspec"
+ select="$entry/ancestor::tgroup/spanspec[@spanname=$spanname]"/>
+ <xsl:variable name="span.colspec"
+ select="$entry/ancestor::tgroup/colspec[@colname=$spanspec/@namest]"/>
+ <xsl:choose>
+ <xsl:when test="$spanspec/@rowsep">
+ <xsl:value-of select="$spanspec/@rowsep"/>
+ </xsl:when>
+ <xsl:when test="$span.colspec/@rowsep">
+ <xsl:value-of select="$span.colspec/@rowsep"/>
+ </xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$entry/@namest">
+ <xsl:variable name="namest" select="$entry/@namest"/>
+ <xsl:variable name="colspec"
+ select="$entry/ancestor::tgroup/colspec[@colname=$namest]"/>
+ <xsl:choose>
+ <xsl:when test="$colspec/@rowsep">
+ <xsl:value-of select="$colspec/@rowsep"/>
+ </xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$colnum > 0">
+ <xsl:variable name="calc.rowsep">
+ <xsl:call-template name="colnum.colspec">
+ <xsl:with-param name="colnum" select="$colnum"/>
+ <xsl:with-param name="attribute" select="'rowsep'"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$calc.rowsep != ''">
+ <xsl:value-of select="$calc.rowsep"/>
+ </xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="calculate.colsep">
+ <xsl:param name="entry" select="."/>
+ <xsl:param name="colnum" select="0"/>
+
+<!--
+ <xsl:text>[</xsl:text>
+ <xsl:value-of select="$colnum"/>
+ <xsl:text>]</xsl:text>
+-->
+
+ <xsl:choose>
+ <xsl:when test="$entry/ancestor::table/@frame = 'all'
+ or $entry/ancestor::informaltable/@frame = 'all'">
+ <xsl:value-of select="1"/>
+ </xsl:when>
+ <xsl:when test="$entry/@colsep">
+ <xsl:value-of select="$entry/@colsep"/>
+ </xsl:when>
+ <xsl:when test="$entry/ancestor::row[1]/@colsep">
+ <xsl:value-of select="$entry/ancestor::row[1]/@colsep"/>
+ </xsl:when>
+ <xsl:when test="$entry/@spanname">
+ <xsl:variable name="spanname" select="$entry/@spanname"/>
+ <xsl:variable name="spanspec"
+ select="$entry/ancestor::tgroup/spanspec[@spanname=$spanname]"/>
+ <xsl:variable name="span.colspec"
+ select="$entry/ancestor::tgroup/colspec[@colname=$spanspec/@namest]"/>
+ <xsl:choose>
+ <xsl:when test="$spanspec/@colsep">
+ <xsl:value-of select="$spanspec/@colsep"/>
+ </xsl:when>
+ <xsl:when test="$span.colspec/@colsep">
+ <xsl:value-of select="$span.colspec/@colsep"/>
+ </xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$entry/@namest">
+ <xsl:variable name="namest" select="$entry/@namest"/>
+ <xsl:variable name="colspec"
+ select="$entry/ancestor::tgroup/colspec[@colname=$namest]"/>
+ <xsl:choose>
+ <xsl:when test="$colspec/@colsep">
+ <xsl:value-of select="$colspec/@colsep"/>
+ </xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$colnum > 0">
+ <xsl:variable name="calc.colsep">
+ <xsl:call-template name="colnum.colspec">
+ <xsl:with-param name="colnum" select="$colnum"/>
+ <xsl:with-param name="attribute" select="'colsep'"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$calc.colsep != ''">
+ <xsl:value-of select="$calc.colsep"/>
+ </xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="colnum.colspec">
+ <xsl:param name="colnum" select="0"/>
+ <xsl:param name="attribute" select="'colname'"/>
+ <xsl:param name="colspecs" select="ancestor::tgroup/colspec"/>
+ <xsl:param name="count" select="1"/>
+
+ <xsl:choose>
+ <xsl:when test="not($colspecs) or $count > $colnum">
+ <!-- nop -->
+ </xsl:when>
+ <xsl:when test="$colspecs[1]/@colnum">
+ <xsl:choose>
+ <xsl:when test="$colspecs[1]/@colnum = $colnum">
+ <xsl:call-template name="get-attribute">
+ <xsl:with-param name="element" select="$colspecs[1]"/>
+ <xsl:with-param name="attribute" select="$attribute"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="colnum.colspec">
+ <xsl:with-param name="colnum" select="$colnum"/>
+ <xsl:with-param name="attribute" select="$attribute"/>
+ <xsl:with-param name="colspecs"
+ select="$colspecs[position()>1]"/>
+ <xsl:with-param name="count"
+ select="$colspecs[1]/@colnum+1"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="$count = $colnum">
+ <xsl:call-template name="get-attribute">
+ <xsl:with-param name="element" select="$colspecs[1]"/>
+ <xsl:with-param name="attribute" select="$attribute"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="colnum.colspec">
+ <xsl:with-param name="colnum" select="$colnum"/>
+ <xsl:with-param name="attribute" select="$attribute"/>
+ <xsl:with-param name="colspecs"
+ select="$colspecs[position()>1]"/>
+ <xsl:with-param name="count" select="$count+1"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="get-attribute">
+ <xsl:param name="element" select="."/>
+ <xsl:param name="attribute" select="''"/>
+
+ <xsl:for-each select="$element/@*">
+ <xsl:if test="local-name(.) = $attribute">
+ <xsl:value-of select="."/>
+ </xsl:if>
+ </xsl:for-each>
+</xsl:template>
+
</xsl:stylesheet>
<!ENTITY table.border.style SYSTEM "../params/table.border.style.xml">
<!ENTITY table.border.color SYSTEM "../params/table.border.color.xml">
<!ENTITY title.margin.left SYSTEM "../params/title.margin.left.xml">
+<!ENTITY table.entry.padding SYSTEM "../params/table.entry.padding.xml">
&verbatim.properties;
&xep.extensions;
&xref.properties;
+&table.entry.padding;
&table.border.thickness;
&table.border.padding;
&table.border.style;
<src:fragref linkend="verbatim.properties"/>
<src:fragref linkend="xep.extensions"/>
<src:fragref linkend="xref.properties"/>
+<src:fragref linkend="table.entry.padding"/>
<src:fragref linkend="table.border.thickness"/>
<src:fragref linkend="table.border.padding"/>
<src:fragref linkend="table.border.style"/>
<!-- ==================================================================== -->
<xsl:template name="empty.table.cell">
- <fo:table-cell text-align="center" display-align="center">
- <fo:block/>
+ <xsl:param name="colnum" select="0"/>
+
+ <xsl:variable name="rowsep">
+ <xsl:call-template name="calculate.rowsep">
+ <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/>
+ <xsl:with-param name="colnum" select="$colnum"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="colsep">
+ <xsl:call-template name="calculate.colsep">
+ <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/>
+ <xsl:with-param name="colnum" select="$colnum"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <fo:table-cell text-align="center"
+ display-align="center"
+ padding="{$table.border.padding}">
+ <xsl:if test="$colsep > 0">
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'right'"/>
+ <xsl:with-param name="padding" select="1"/>
+ </xsl:call-template>
+ </xsl:if>
+ <!-- don't draw a rowsep on this cell if this row already has one -->
+ <xsl:if test="$rowsep > 0
+ and ancestor::row[1]/@rowsep != 1">
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'bottom'"/>
+ <xsl:with-param name="padding" select="1"/>
+ </xsl:call-template>
+ </xsl:if>
+ <fo:block>
+ <!--
+ <xsl:text>e(</xsl:text>
+ <xsl:value-of select="$rowsep"/>
+ <xsl:text>,</xsl:text>
+ <xsl:value-of select="$colsep"/>
+ <xsl:text>)</xsl:text>
+ -->
+ </fo:block>
</fo:table-cell>
</xsl:template>
<xsl:param name="side" select="'left'"/>
<xsl:param name="padding" select="0"/>
- <xsl:attribute name="border-{$side}">
+ <xsl:attribute name="border-{$side}-width">
<xsl:value-of select="$table.border.thickness"/>
- <xsl:text> </xsl:text>
+ </xsl:attribute>
+ <xsl:attribute name="border-{$side}-style">
<xsl:value-of select="$table.border.style"/>
- <xsl:text> </xsl:text>
+ </xsl:attribute>
+ <xsl:attribute name="border-{$side}-color">
<xsl:value-of select="$table.border.color"/>
- <xsl:text> </xsl:text>
</xsl:attribute>
<xsl:if test="$padding != 0">
<xsl:attribute name="padding-{$side}">
<!-- ==================================================================== -->
<xsl:template match="tgroup">
- <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
-
<xsl:variable name="explicit.table.width">
<xsl:call-template name="dbfo-attribute">
<xsl:with-param name="pis"
<xsl:when test="$use.extensions != 0
and $tablecolumns.extension != 0">
<xsl:choose>
- <xsl:when test="contains($vendor, 'SAXON 6')">
+ <xsl:when test="function-available('stbl:adjustColumnWidths')">
<xsl:copy-of select="stbl:adjustColumnWidths($colspecs)"/>
</xsl:when>
- <xsl:when test="contains($vendor, 'SAXON 5')">
- <!-- the saxon5 extension doesn't support this (yet) -->
- <xsl:call-template name="generate.colgroup">
- <xsl:with-param name="cols" select="@cols"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($vendor, 'Apache Software Foundation')">
+ <xsl:when test="function-available('xtbl:adjustColumnWidths')">
<xsl:copy-of select="xtbl:adjustColumnWidths($colspecs)"/>
</xsl:when>
<xsl:otherwise>
<xsl:message terminate="yes">
- <xsl:text>Don't know how to do adjust column widths with </xsl:text>
- <xsl:value-of select="$vendor"/>
+ <xsl:text>No adjustColumnWidths function available.</xsl:text>
</xsl:message>
</xsl:otherwise>
</xsl:choose>
<xsl:variable name="empty.cell" select="count(node()) = 0"/>
- <xsl:variable name="entry.colnum">
+ <xsl:variable name="named.colnum">
<xsl:call-template name="entry.colnum"/>
</xsl:variable>
+ <xsl:variable name="entry.colnum">
+ <xsl:choose>
+ <xsl:when test="$named.colnum > 0">
+ <xsl:value-of select="$named.colnum"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$col"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
<xsl:variable name="entry.colspan">
<xsl:choose>
- <xsl:when test="@namest and @nameend">
+ <xsl:when test="@spanname or @namest">
<xsl:call-template name="calculate.colspan"/>
</xsl:when>
<xsl:otherwise>1</xsl:otherwise>
</xsl:call-template>
</xsl:variable>
+ <xsl:variable name="rowsep">
+ <xsl:call-template name="calculate.rowsep">
+ <xsl:with-param name="entry" select="."/>
+ <xsl:with-param name="colnum" select="$entry.colnum"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="colsep">
+ <xsl:call-template name="calculate.colsep">
+ <xsl:with-param name="entry" select="."/>
+ <xsl:with-param name="colnum" select="$entry.colnum"/>
+ </xsl:call-template>
+ </xsl:variable>
+
<xsl:choose>
<xsl:when test="$spans != '' and not(starts-with($spans,'0:'))">
<xsl:call-template name="entry">
</xsl:when>
<xsl:when test="$entry.colnum > $col">
- <xsl:call-template name="empty.table.cell"/>
+ <xsl:call-template name="empty.table.cell">
+ <xsl:with-param name="colnum" select="$col"/>
+ </xsl:call-template>
<xsl:call-template name="entry">
<xsl:with-param name="col" select="$col+1"/>
<xsl:with-param name="spans" select="substring-after($spans,':')"/>
</xsl:when>
<xsl:otherwise>
- <fo:table-cell>
+ <fo:table-cell padding="{$table.border.padding}">
<xsl:call-template name="anchor"/>
<xsl:choose>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
- <xsl:if test="@colsep='1'">
+ <xsl:if test="$colsep > 0">
<xsl:call-template name="border">
<xsl:with-param name="side" select="'right'"/>
<xsl:with-param name="padding" select="1"/>
</xsl:call-template>
</xsl:if>
- <xsl:if test="@rowsep='1'">
+ <!-- don't draw a rowsep on this cell if this row has one -->
+ <xsl:if test="$rowsep > 0
+ and ancestor::row[1]/@rowsep != 1">
<xsl:call-template name="border">
<xsl:with-param name="side" select="'bottom'"/>
<xsl:with-param name="padding" select="1"/>
-->
<fo:block>
+ <!--
+ <xsl:text>(</xsl:text>
+ <xsl:value-of select="$rowsep"/>
+ <xsl:text>,</xsl:text>
+ <xsl:value-of select="$colsep"/>
+ <xsl:text>)</xsl:text>
+ -->
<xsl:choose>
<xsl:when test="$empty.cell">
<xsl:text> </xsl:text>
<xsl:otherwise>
<xsl:call-template name="finaltd">
<xsl:with-param name="spans" select="$following.spans"/>
+ <xsl:with-param name="col" select="$col+$entry.colspan"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
<xsl:variable name="entry.colspan">
<xsl:choose>
- <xsl:when test="@namest and @nameend">
+ <xsl:when test="@spanname or @namest">
<xsl:call-template name="calculate.colspan"/>
</xsl:when>
<xsl:otherwise>1</xsl:otherwise>
<!ENTITY chunk.datafile SYSTEM "../params/chunk.datafile.xml">
<!ENTITY saxon.character.representation SYSTEM "../params/saxon.character.representation.xml">
<!ENTITY generate.legalnotice.link SYSTEM "../params/generate.legalnotice.link.xml">
+
+<!ENTITY table.borders.with.css SYSTEM "../params/table.borders.with.css.xml">
+<!ENTITY table.border.thickness SYSTEM "../params/table.border.thickness.xml">
+<!ENTITY table.border.style SYSTEM "../params/table.border.style.xml">
+<!ENTITY table.border.color SYSTEM "../params/table.border.color.xml">
<reference><title>Tables</title>
&default.table.width;
&nominal.table.width;
+&table.borders.with.css;
+&table.border.style;
+&table.border.thickness;
+&table.border.color;
</reference>
<reference><title>QAndASet</title>
<src:fragref linkend="use.id.as.filename"/>
<src:fragref linkend="use.id.function"/>
<src:fragref linkend="using.chunker"/>
+<src:fragref linkend="table.borders.with.css"/>
+<src:fragref linkend="table.border.thickness"/>
+<src:fragref linkend="table.border.style"/>
+<src:fragref linkend="table.border.color"/>
</xsl:stylesheet>
</src:fragment>
functions="adjustColumnWidths"/>
<xsl:template name="empty.table.cell">
- <td class="auto-generated"> </td>
+ <xsl:param name="colnum" select="0"/>
+
+ <xsl:variable name="rowsep">
+ <xsl:call-template name="calculate.rowsep">
+ <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/>
+ <xsl:with-param name="colnum" select="$colnum"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="colsep">
+ <xsl:call-template name="calculate.colsep">
+ <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/>
+ <xsl:with-param name="colnum" select="$colnum"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <td class="auto-generated">
+ <xsl:if test="$table.borders.with.css != 0">
+ <xsl:attribute name="style">
+ <xsl:if test="$colsep > 0">
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'right'"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="$rowsep > 0">
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'bottom'"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:text> </xsl:text>
+ </td>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="border">
+ <xsl:param name="side" select="'left'"/>
+ <xsl:param name="padding" select="0"/>
+
+ <xsl:text>border-</xsl:text>
+ <xsl:value-of select="$side"/>
+ <xsl:text>: </xsl:text>
+ <xsl:value-of select="$table.border.thickness"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$table.border.style"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$table.border.color"/>
+ <xsl:text>; </xsl:text>
</xsl:template>
+<!-- ==================================================================== -->
+
<xsl:template match="tgroup">
<table>
<xsl:choose>
<xsl:when test="../@frame='none'">
<xsl:attribute name="border">0</xsl:attribute>
</xsl:when>
+ <xsl:when test="$table.borders.with.css != 0">
+ <xsl:attribute name="border">0</xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="../@frame='topbot' or ../@frame='top'">
+ <xsl:attribute name="style">
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'top'"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:when test="../@frame='sides'">
+ <xsl:attribute name="style">
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'left'"/>
+ </xsl:call-template>
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'right'"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:when>
<xsl:otherwise>
<xsl:attribute name="border">1</xsl:attribute>
</xsl:otherwise>
<xsl:param name="spans"/>
<tr>
+ <xsl:if test="$table.borders.with.css != 0">
+ <xsl:if test="@rowsep = 1">
+ <xsl:attribute name="style">
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'bottom'"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:if>
+ </xsl:if>
+
<xsl:if test="@align">
<xsl:attribute name="align">
<xsl:value-of select="@align"/>
<xsl:variable name="empty.cell" select="count(node()) = 0"/>
- <xsl:variable name="entry.colnum">
+ <xsl:variable name="named.colnum">
<xsl:call-template name="entry.colnum"/>
</xsl:variable>
+ <xsl:variable name="entry.colnum">
+ <xsl:choose>
+ <xsl:when test="$named.colnum > 0">
+ <xsl:value-of select="$named.colnum"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$col"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
<xsl:variable name="entry.colspan">
<xsl:choose>
- <xsl:when test="@namest and @nameend">
+ <xsl:when test="@spanname or @namest">
<xsl:call-template name="calculate.colspan"/>
</xsl:when>
<xsl:otherwise>1</xsl:otherwise>
</xsl:call-template>
</xsl:variable>
+ <xsl:variable name="rowsep">
+ <xsl:call-template name="calculate.rowsep">
+ <xsl:with-param name="entry" select="."/>
+ <xsl:with-param name="colnum" select="$entry.colnum"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="colsep">
+ <xsl:call-template name="calculate.colsep">
+ <xsl:with-param name="entry" select="."/>
+ <xsl:with-param name="colnum" select="$entry.colnum"/>
+ </xsl:call-template>
+ </xsl:variable>
+
<xsl:choose>
<xsl:when test="$spans != '' and not(starts-with($spans,'0:'))">
<xsl:call-template name="entry">
<xsl:otherwise>
<xsl:element name="{$cellgi}">
+ <xsl:if test="$table.borders.with.css != 0">
+ <xsl:attribute name="style">
+ <xsl:if test="$colsep > 0">
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'right'"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="$rowsep > 0">
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'bottom'"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:attribute>
+ </xsl:if>
+
<xsl:if test="@morerows > 0">
<xsl:attribute name="rowspan">
<xsl:value-of select="1+@morerows"/>
<xsl:otherwise>
<xsl:call-template name="finaltd">
<xsl:with-param name="spans" select="$following.spans"/>
+ <xsl:with-param name="col" select="$col+$entry.colspan"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
<xsl:variable name="entry.colspan">
<xsl:choose>
- <xsl:when test="@namest and @nameend">
+ <xsl:when test="@spanname or @namest">
<xsl:call-template name="calculate.colspan"/>
</xsl:when>
<xsl:otherwise>1</xsl:otherwise>
--- /dev/null
+<refentry>
+<refmeta>
+<refentrytitle>table.borders.with.css</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>table.borders.with.css</refname>
+<refpurpose>Use CSS to specify table, row, and cell borders?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id="table.borders.with.css">
+<xsl:param name="table.borders.with.css" select="0"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), CSS will be used to draw table borders.
+</para>
+
+</refsect1>
+</refentry>
--- /dev/null
+<refentry>
+<refmeta>
+<refentrytitle>table.entry.padding</refentrytitle>
+<refmiscinfo role="type"></refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>table.entry.padding</refname>
+<refpurpose></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id="table.entry.padding">
+<xsl:param name="table.entry.padding" select="'2pt'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>