<xsl:template match="xhtml:table">
<docbook:table>
<xsl:variable name="width" select="editor:getStyleValue(@style, 'width')"/>
<xsl:if test="$width = '100%'">
<xsl:attribute name="width">100%</xsl:attribute>
</xsl:if>
<xsl:if test="caption/text()">
<xsl:attribute name="title"><xsl:value-of select="caption/text()"/></xsl:attribute>
<xsl:variable name="captionTextAlign" select="editor:getStyleValue(caption/@style, 'text-align')"/>
<xsl:if test="$captionTextAlign != ''">
<xsl:attribute name="titleAlign"><xsl:value-of select="$captionTextAlign"/></xsl:attribute>
</xsl:if>
</xsl:if>
<xsl:copy-of select="@class"/>
<xsl:copy-of select="@summary"/>
<xsl:copy-of select="@align"/>
<xsl:copy-of select="@marker"/>
<xsl:apply-templates select="xhtml:tbody"/>
</docbook:table>
</xsl:template>
<xsl:template match="xhtml:tbody">
<docbook:tbody>
<xsl:copy-of select="@class"/>
<xsl:apply-templates select="xhtml:tr"/>
</docbook:tbody>
</xsl:template>
<xsl:template match="xhtml:tr">
<docbook:tr>
<xsl:copy-of select="@class"/>
<xsl:apply-templates select="xhtml:td|xhtml:th"/>
</docbook:tr>
</xsl:template>
<xsl:template match="xhtml:th">
<docbook:th>
<xsl:copy-of select="@class"/>
<xsl:copy-of select="@colspan"/>
<xsl:copy-of select="@rowspan"/>
<xsl:variable name="valign" select="editor:getStyleValue(@style, 'vertical-align')"/>
<xsl:if test="$valign != ''">
<xsl:attribute name="valign"><xsl:value-of select="$valign"/></xsl:attribute>
</xsl:if>
<xsl:variable name="align" select="editor:getStyleValue(@style, 'text-align')"/>
<xsl:if test="$align != ''">
<xsl:attribute name="align"><xsl:value-of select="$align"/></xsl:attribute>
</xsl:if>
<xsl:variable name="height" select="editor:getStyleValue(@style, 'height')"/>
<xsl:if test="$height != ''">
<xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute>
</xsl:if>
<xsl:variable name="width" select="editor:getStyleValue(@style, 'width')"/>
<xsl:if test="$width != ''">
<xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute>
</xsl:if>
<xsl:apply-templates/>
</docbook:th>
</xsl:template>
<xsl:template match="xhtml:td">
<docbook:td>
<xsl:copy-of select="@class"/>
<xsl:copy-of select="@colspan"/>
<xsl:copy-of select="@rowspan"/>
<xsl:variable name="valign" select="editor:getStyleValue(@style, 'vertical-align')"/>
<xsl:if test="$valign != ''">
<xsl:attribute name="valign"><xsl:value-of select="$valign"/></xsl:attribute>
</xsl:if>
<xsl:variable name="align" select="editor:getStyleValue(@style, 'text-align')"/>
<xsl:if test="$align != ''">
<xsl:attribute name="align"><xsl:value-of select="$align"/></xsl:attribute>
</xsl:if>
<xsl:variable name="height" select="editor:getStyleValue(@style, 'height')"/>
<xsl:if test="$height != ''">
<xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute>
</xsl:if>
<xsl:variable name="width" select="editor:getStyleValue(@style, 'width')"/>
<xsl:if test="$width != ''">
<xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute>
</xsl:if>
<xsl:apply-templates/>
</docbook:td>
</xsl:template>
Do not work if table has no header