<xsl:variable name="prop-columns"
select=".//colspec[contains(@colwidth, '*')]"/>
- <fo:table-and-caption id="{$id}"
- xsl:use-attribute-sets="formal.object.properties"
- keep-together.within-column="1">
- <fo:table-caption>
- <fo:block xsl:use-attribute-sets="formal.title.properties">
- <xsl:apply-templates select="." mode="object.title.markup"/>
- </fo:block>
- </fo:table-caption>
- <fo:table>
- <xsl:if test="count($prop-columns) != 0">
- <xsl:attribute name="table-layout">fixed</xsl:attribute>
- </xsl:if>
- <xsl:apply-templates/>
- </fo:table>
- </fo:table-and-caption>
+ <fo:block>
+ <xsl:attribute name="span">
+ <xsl:choose>
+ <xsl:when test="@pgwide=1">all</xsl:when>
+ <xsl:otherwise>none</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+
+ <fo:table-and-caption id="{$id}"
+ xsl:use-attribute-sets="formal.object.properties"
+ keep-together.within-column="1">
+ <fo:table-caption>
+ <fo:block xsl:use-attribute-sets="formal.title.properties">
+ <xsl:apply-templates select="." mode="object.title.markup"/>
+ </fo:block>
+ </fo:table-caption>
+ <fo:table>
+ <xsl:variable name="frame">
+ <xsl:choose>
+ <xsl:when test="@frame">
+ <xsl:value-of select="@frame"/>
+ </xsl:when>
+ <xsl:otherwise>all</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$frame='all'">
+ <xsl:attribute name="border-left-style">solid</xsl:attribute>
+ <xsl:attribute name="border-right-style">solid</xsl:attribute>
+ <xsl:attribute name="border-top-style">solid</xsl:attribute>
+ <xsl:attribute name="border-bottom-style">solid</xsl:attribute>
+ </xsl:when>
+ <xsl:when test="$frame='bottom'">
+ <xsl:attribute name="border-left-style">none</xsl:attribute>
+ <xsl:attribute name="border-right-style">none</xsl:attribute>
+ <xsl:attribute name="border-top-style">none</xsl:attribute>
+ <xsl:attribute name="border-bottom-style">solid</xsl:attribute>
+ </xsl:when>
+ <xsl:when test="$frame='sides'">
+ <xsl:attribute name="border-left-style">solid</xsl:attribute>
+ <xsl:attribute name="border-right-style">solid</xsl:attribute>
+ <xsl:attribute name="border-top-style">none</xsl:attribute>
+ <xsl:attribute name="border-bottom-style">none</xsl:attribute>
+ </xsl:when>
+ <xsl:when test="$frame='top'">
+ <xsl:attribute name="border-left-style">none</xsl:attribute>
+ <xsl:attribute name="border-right-style">none</xsl:attribute>
+ <xsl:attribute name="border-top-style">solid</xsl:attribute>
+ <xsl:attribute name="border-bottom-style">none</xsl:attribute>
+ </xsl:when>
+ <xsl:when test="$frame='topbot'">
+ <xsl:attribute name="border-left-style">none</xsl:attribute>
+ <xsl:attribute name="border-right-style">none</xsl:attribute>
+ <xsl:attribute name="border-top-style">solid</xsl:attribute>
+ <xsl:attribute name="border-bottom-style">solid</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>Impossible frame on table: </xsl:text>
+ <xsl:value-of select="$frame"/>
+ </xsl:message>
+ <xsl:attribute name="border-left-style">none</xsl:attribute>
+ <xsl:attribute name="border-right-style">none</xsl:attribute>
+ <xsl:attribute name="border-top-style">none</xsl:attribute>
+ <xsl:attribute name="border-bottom-style">none</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:if test="count($prop-columns) != 0">
+ <xsl:attribute name="table-layout">fixed</xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </fo:table>
+ </fo:table-and-caption>
+ </fo:block>
</xsl:template>
<xsl:template match="equation">
<xsl:variable name="prop-columns"
select=".//colspec[contains(@colwidth, '*')]"/>
- <fo:table>
- <xsl:if test="count($prop-columns) != 0">
- <xsl:attribute name="table-layout">fixed</xsl:attribute>
- </xsl:if>
- <xsl:apply-templates/>
- </fo:table>
+ <fo:block>
+ <xsl:attribute name="span">
+ <xsl:choose>
+ <xsl:when test="@pgwide=1">all</xsl:when>
+ <xsl:otherwise>none</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+
+ <fo:table>
+ <xsl:variable name="frame">
+ <xsl:choose>
+ <xsl:when test="@frame">
+ <xsl:value-of select="@frame"/>
+ </xsl:when>
+ <xsl:otherwise>all</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$frame='all'">
+ <xsl:attribute name="border-left-style">solid</xsl:attribute>
+ <xsl:attribute name="border-right-style">solid</xsl:attribute>
+ <xsl:attribute name="border-top-style">solid</xsl:attribute>
+ <xsl:attribute name="border-bottom-style">solid</xsl:attribute>
+ </xsl:when>
+ <xsl:when test="$frame='bottom'">
+ <xsl:attribute name="border-left-style">none</xsl:attribute>
+ <xsl:attribute name="border-right-style">none</xsl:attribute>
+ <xsl:attribute name="border-top-style">none</xsl:attribute>
+ <xsl:attribute name="border-bottom-style">solid</xsl:attribute>
+ </xsl:when>
+ <xsl:when test="$frame='sides'">
+ <xsl:attribute name="border-left-style">solid</xsl:attribute>
+ <xsl:attribute name="border-right-style">solid</xsl:attribute>
+ <xsl:attribute name="border-top-style">none</xsl:attribute>
+ <xsl:attribute name="border-bottom-style">none</xsl:attribute>
+ </xsl:when>
+ <xsl:when test="$frame='top'">
+ <xsl:attribute name="border-left-style">none</xsl:attribute>
+ <xsl:attribute name="border-right-style">none</xsl:attribute>
+ <xsl:attribute name="border-top-style">solid</xsl:attribute>
+ <xsl:attribute name="border-bottom-style">none</xsl:attribute>
+ </xsl:when>
+ <xsl:when test="$frame='topbot'">
+ <xsl:attribute name="border-left-style">none</xsl:attribute>
+ <xsl:attribute name="border-right-style">none</xsl:attribute>
+ <xsl:attribute name="border-top-style">solid</xsl:attribute>
+ <xsl:attribute name="border-bottom-style">solid</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>Impossible frame on informaltable: </xsl:text>
+ <xsl:value-of select="$frame"/>
+ </xsl:message>
+ <xsl:attribute name="border-left-style">none</xsl:attribute>
+ <xsl:attribute name="border-right-style">none</xsl:attribute>
+ <xsl:attribute name="border-top-style">none</xsl:attribute>
+ <xsl:attribute name="border-bottom-style">none</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:if test="count($prop-columns) != 0">
+ <xsl:attribute name="table-layout">fixed</xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </fo:table>
+ </fo:block>
</xsl:template>
<xsl:template match="informalequation">
<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:if test="$rowsep > 0">
<xsl:call-template name="border">
<xsl:with-param name="side" select="'bottom'"/>
<xsl:with-param name="padding" select="1"/>
<xsl:template match="thead">
<xsl:variable name="tgroup" select="parent::*"/>
- <xsl:variable name="frame" select="$tgroup/parent::*/@frame"/>
<fo:table-header>
- <xsl:choose>
- <xsl:when test="$frame='topbot' or $frame='top'">
- <xsl:call-template name="border">
- <xsl:with-param name="side" select="'top'"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$frame='sides'">
- <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:when>
- </xsl:choose>
-
<xsl:apply-templates select="row[1]">
<xsl:with-param name="spans">
<xsl:call-template name="blank.spans">
<xsl:template match="tfoot">
<xsl:variable name="tgroup" select="parent::*"/>
- <xsl:variable name="frame" select="$tgroup/parent::*/@frame"/>
<fo:table-footer>
- <xsl:choose>
- <xsl:when test="$frame='topbot' or $frame='top'">
- <xsl:call-template name="border">
- <xsl:with-param name="side" select="'top'"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$frame='sides'">
- <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:when>
- </xsl:choose>
-
<xsl:apply-templates select="row[1]">
<xsl:with-param name="spans">
<xsl:call-template name="blank.spans">
<xsl:template match="tbody">
<xsl:variable name="tgroup" select="parent::*"/>
- <xsl:variable name="frame" select="$tgroup/parent::*/@frame"/>
- <fo:table-body>
- <xsl:choose>
- <xsl:when test="$frame='top'">
- <xsl:choose>
- <xsl:when test="preceding-sibling::thead">
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="border">
- <xsl:with-param name="side" select="'top'"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="$frame='bottom'">
- <xsl:choose>
- <xsl:when test="preceding-sibling::tfoot">
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="border">
- <xsl:with-param name="side" select="'bottom'"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="$frame='topbot'">
- <xsl:choose>
- <xsl:when test="preceding-sibling::thead">
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="border">
- <xsl:with-param name="side" select="'top'"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="preceding-sibling::tfoot">
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="border">
- <xsl:with-param name="side" select="'bottom'"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="$frame='sides'">
- <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:when>
- </xsl:choose>
+ <fo:table-body>
<xsl:apply-templates select="row[1]">
<xsl:with-param name="spans">
<xsl:call-template name="blank.spans">
<fo:table-row>
<xsl:call-template name="anchor"/>
- <xsl:if test="@rowsep='1'">
- <xsl:call-template name="border">
- <xsl:with-param name="side" select="'bottom'"/>
- </xsl:call-template>
- </xsl:if>
-
<xsl:apply-templates select="entry[1]">
<xsl:with-param name="spans" select="$spans"/>
</xsl:apply-templates>
<xsl:choose>
<xsl:when test="$frame='all'">
- <xsl:call-template name="border">
- <xsl:with-param name="side" select="'left'"/>
- <xsl:with-param name="padding" select="1"/>
- </xsl:call-template>
<xsl:call-template name="border">
<xsl:with-param name="side" select="'right'"/>
<xsl:with-param name="padding" select="1"/>
</xsl:call-template>
- <xsl:call-template name="border">
- <xsl:with-param name="side" select="'top'"/>
- <xsl:with-param name="padding" select="1"/>
- </xsl:call-template>
<xsl:call-template name="border">
<xsl:with-param name="side" select="'bottom'"/>
<xsl:with-param name="padding" select="1"/>
<xsl:with-param name="padding" select="1"/>
</xsl:call-template>
</xsl:if>
- <!-- 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:if test="$rowsep > 0">
<xsl:call-template name="border">
<xsl:with-param name="side" select="'bottom'"/>
<xsl:with-param name="padding" select="1"/>