|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
Packit Service |
76cb02 |
xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
|
|
Packit Service |
76cb02 |
xmlns:exsl="http://exslt.org/common"
|
|
Packit Service |
76cb02 |
exclude-result-prefixes="doc exsl" version='1.0'>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:param name="default.table.rules">none</xsl:param>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template match="table|informaltable" mode="htmlTable">
|
|
Packit Service |
76cb02 |
<xsl:param name="tabletype">tabular</xsl:param>
|
|
Packit Service |
76cb02 |
<xsl:param name="tablewidth">\linewidth-2\tabcolsep</xsl:param>
|
|
Packit Service |
76cb02 |
<xsl:param name="tableframe">all</xsl:param>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="numcols">
|
|
Packit Service |
76cb02 |
<xsl:call-template name="widest-html-row">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="rows" select=".//tr"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="table.width">
|
|
Packit Service |
76cb02 |
<xsl:call-template name="table.width">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="fullwidth" select="$tablewidth"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="width">
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="not(contains($table.width,'auto'))">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$table.width"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:call-template name="table.width">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="fullwidth" select="$tablewidth"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="exclude" select="'auto'"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="frame">
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="@frame">
|
|
Packit Service |
76cb02 |
<xsl:call-template name="cals.frame">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="frame" select="@frame"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise><xsl:value-of select="$tableframe"/></xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="colspec">
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="colgroup or col">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
mode="make.colspec">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colnum" select="1"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colmax" select="$numcols"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:call-template name="make.colspec.default">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colnum" select="1"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colmax" select="$numcols"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="rows-head" select="tr[child::th]"/>
|
|
Packit Service |
76cb02 |
<xsl:variable name="rows-body" select="tr[not(child::th)]"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="rows">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="thead">
|
|
Packit Service |
76cb02 |
<xsl:apply-templates select="thead" mode="htmlTable">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colspec" select="exsl:node-set($colspec)"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:apply-templates select="$rows-head[1]" mode="htmlTable">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colspec" select="exsl:node-set($colspec)"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="rownum" select="1"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="context" select="'thead'"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="tbody">
|
|
Packit Service |
76cb02 |
<xsl:apply-templates select="tbody" mode="htmlTable">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colspec" select="exsl:node-set($colspec)"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:apply-templates select="$rows-body[1]" mode="htmlTable">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colspec" select="exsl:node-set($colspec)"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
count(thead/*) + 1"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:apply-templates select="tfoot/tr[1]" mode="htmlTable">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colspec" select="exsl:node-set($colspec)"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="rownum" select="count(.//tr[not(parent::tfoot)])+1"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="colspec2">
|
|
Packit Service |
76cb02 |
<xsl:call-template name="build.colwidth">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colspec" select="exsl:node-set($colspec)"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="rows" select="exsl:node-set($rows)"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:copy-of select="exsl:node-set($colspec2)"/>
|
|
Packit Service |
76cb02 |
<xsl:copy-of select="exsl:node-set($rows)"/>
|
|
Packit Service |
76cb02 |
-->
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="t.rows" select="exsl:node-set($rows)"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:text>\begingroup%
</xsl:text>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:if test="@cellpadding">
|
|
Packit Service |
76cb02 |
<xsl:text>\setlength{\tabcolsep}{</xsl:text>
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="contains(@cellpadding, '%')">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
select="number(substring-before(@cellpadding,'%')) div 100"/>
|
|
Packit Service |
76cb02 |
<xsl:text>\linewidth</xsl:text>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="@cellpadding"/>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:text>}%
</xsl:text>
|
|
Packit Service |
76cb02 |
</xsl:if>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:text>\setlength{\tablewidth}{</xsl:text>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$width"/>
|
|
Packit Service |
76cb02 |
<xsl:text>}%
</xsl:text>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:if test="$tabletype != 'tabularx'">
|
|
Packit Service |
76cb02 |
<xsl:call-template name="tbl.sizes">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colspec" select="exsl:node-set($colspec2)"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="width" select="$width"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</xsl:if>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:if test="$tabletype = 'tabularx'">
|
|
Packit Service |
76cb02 |
<xsl:call-template name="tbl.valign.x">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="valign" select="@valign"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</xsl:if>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:call-template name="tbl.begin">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colspec" select="exsl:node-set($colspec2)"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="tabletype" select="$tabletype"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="width" select="$width"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:if test="$frame = 'all' or $frame = 'top' or $frame = 'topbot'">
|
|
Packit Service |
76cb02 |
<xsl:text>\hline</xsl:text>
|
|
Packit Service |
76cb02 |
</xsl:if>
|
|
Packit Service |
76cb02 |
<xsl:text>
</xsl:text>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="headrows">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
mode="htmlTable">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colspec" select="exsl:node-set($colspec2)"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="context" select="'thead'"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="frame" select="$frame"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:apply-templates select="." mode="newtbl.endhead">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="tabletype" select="$tabletype"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="headrows" select="$headrows"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
mode="htmlTable">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colspec" select="exsl:node-set($colspec2)"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="context" select="'tbody'"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="frame" select="$frame"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:if test="$frame = 'all' or $frame = 'bottom' or $frame = 'topbot'">
|
|
Packit Service |
76cb02 |
<xsl:text>\hline</xsl:text>
|
|
Packit Service |
76cb02 |
</xsl:if>
|
|
Packit Service |
76cb02 |
<xsl:text>
</xsl:text>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:text>\end{</xsl:text>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$tabletype"/>
|
|
Packit Service |
76cb02 |
<xsl:text>}\endgroup%
</xsl:text>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template match="row" mode="htmlTable">
|
|
Packit Service |
76cb02 |
<xsl:param name="colspec"/>
|
|
Packit Service |
76cb02 |
<xsl:param name="context"/>
|
|
Packit Service |
76cb02 |
<xsl:param name="frame"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:apply-templates mode="newtbl">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colspec" select="$colspec"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="context" select="$context"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="frame" select="$frame"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="rownum" select="@rownum"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:text>\tabularnewline
</xsl:text>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:if test="@rowsep=1">
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="$newtbl.use.hhline='1'">
|
|
Packit Service |
76cb02 |
<xsl:call-template name="hhline.build">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="entries" select="."/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="rownum" select="@rownum"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:call-template name="clines.build">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="entries" select="."/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="rownum" select="@rownum"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:if>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template match="thead" mode="htmlTable">
|
|
Packit Service |
76cb02 |
<xsl:param name="colspec"/>
|
|
Packit Service |
76cb02 |
<xsl:apply-templates select="tr[1]" mode="htmlTable">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colspec" select="$colspec"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="rownum" select="1"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template match="tbody" mode="htmlTable">
|
|
Packit Service |
76cb02 |
<xsl:param name="colspec"/>
|
|
Packit Service |
76cb02 |
<xsl:apply-templates select="tr[1]" mode="htmlTable">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colspec" select="$colspec"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
select="count(preceding-sibling::*[self::tbody or
|
|
Packit Service |
76cb02 |
self::thead]/*)+1"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
has the required 'context'
|
|
Packit Service |
76cb02 |
-->
|
|
Packit Service |
76cb02 |
<xsl:template match="tr" mode="htmlTable">
|
|
Packit Service |
76cb02 |
<xsl:param name="rownum"/>
|
|
Packit Service |
76cb02 |
<xsl:param name="colspec"/>
|
|
Packit Service |
76cb02 |
<xsl:param name="oldentries"><nop/></xsl:param>
|
|
Packit Service |
76cb02 |
<xsl:param name="context"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="type">
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="parent::thead">thead</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="parent::tbody">tbody</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="parent::tfoot">tfoot</xsl:when>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:when test="th">thead</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>tbody</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:if test="$context='' or $type=$context">
|
|
Packit Service |
76cb02 |
<xsl:variable name="entries">
|
|
Packit Service |
76cb02 |
<xsl:apply-templates select="(td|th)[1]" mode="htmlTable">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colspec" select="$colspec"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="rownum" select="$rownum"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colnum" select="1"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="entries" select="exsl:node-set($oldentries)"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<row type='{$type}' rownum='{$rownum}'>
|
|
Packit Service |
76cb02 |
<xsl:call-template name="html.table.row.rules"/>
|
|
Packit Service |
76cb02 |
<xsl:copy-of select="$entries"/>
|
|
Packit Service |
76cb02 |
</row>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:apply-templates select="following-sibling::tr[1]" mode="htmlTable">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colspec" select="$colspec"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="rownum" select="$rownum + 1"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="oldentries" select="$entries"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="context" select="$context"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
</xsl:if>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template name="html.table.row.rules">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
select="(ancestor::table |
|
|
Packit Service |
76cb02 |
ancestor::informaltable)[last()]/@border"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
select="(ancestor::table |
|
|
Packit Service |
76cb02 |
ancestor::informaltable)[last()]/@rules"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="rules">
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="$table.rules != ''">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$table.rules"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="$border != '' and number($border) != 0">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="'all'"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="$border != '' and number($border) = 0">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="'none'"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="$default.table.rules != ''">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$default.table.rules"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:when test="$rules = 'none'">
|
|
Packit Service |
76cb02 |
<xsl:attribute name="rowsep">0</xsl:attribute>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:when test="$rules = 'cols'">
|
|
Packit Service |
76cb02 |
<xsl:attribute name="rowsep">0</xsl:attribute>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:when test="$rules = 'rows' or $rules = 'all'">
|
|
Packit Service |
76cb02 |
<xsl:variable name="rowborder">
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
following-sibling::tbody/tr">1</xsl:when>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
following-sibling::tfoot/tr">1</xsl:when>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
following-sibling::tr">1</xsl:when>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
preceding-sibling::tfoot/tr">1</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="preceding-sibling::tfoot/tr">1</xsl:when>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
not(@rowspan = count(following-sibling::tr) + 1)">1</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>0</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:if test="$rowborder = 1">
|
|
Packit Service |
76cb02 |
<xsl:attribute name="rowsep">1</xsl:attribute>
|
|
Packit Service |
76cb02 |
</xsl:if>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
and not(following-sibling::tr)">
|
|
Packit Service |
76cb02 |
<xsl:attribute name="rowsep">1</xsl:attribute>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
and not(preceding-sibling::tr)">
|
|
Packit Service |
76cb02 |
<xsl:attribute name="rowsep">1</xsl:attribute>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template name="html.table.column.rules">
|
|
Packit Service |
76cb02 |
<xsl:param name="colnum"/>
|
|
Packit Service |
76cb02 |
<xsl:param name="colmax"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
select="(ancestor-or-self::table |
|
|
Packit Service |
76cb02 |
ancestor-or-self::informaltable)[last()]/@border"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
select="(ancestor-or-self::table |
|
|
Packit Service |
76cb02 |
ancestor-or-self::informaltable)[last()]/@rules"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="rules">
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="$table.rules != ''">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$table.rules"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="$border != '' and number($border) != 0">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="'all'"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="$border != '' and number($border) = 0">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="'none'"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="$default.table.rules != ''">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$default.table.rules"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="$rules = 'none'">
|
|
Packit Service |
76cb02 |
<xsl:attribute name="colsep">0</xsl:attribute>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="$rules = 'rows'">
|
|
Packit Service |
76cb02 |
<xsl:attribute name="colsep">0</xsl:attribute>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="$rules = 'groups'">
|
|
Packit Service |
76cb02 |
<xsl:attribute name="colsep">0</xsl:attribute>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
($colnum < $colmax)">
|
|
Packit Service |
76cb02 |
<xsl:attribute name="colsep">1</xsl:attribute>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template match="td|th" mode="htmlTable">
|
|
Packit Service |
76cb02 |
<xsl:param name="rownum"/>
|
|
Packit Service |
76cb02 |
<xsl:param name="colnum"/>
|
|
Packit Service |
76cb02 |
<xsl:param name="colspec"/>
|
|
Packit Service |
76cb02 |
<xsl:param name="entries"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="cols" select="count($colspec/*)"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:if test="$colnum <= $cols">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
select="$entries/*[self::entry or self::entrytbl]
|
|
Packit Service |
76cb02 |
[@colstart=$colnum and
|
|
Packit Service |
76cb02 |
@rowend >= $rownum]"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:choose><xsl:when test="$entry">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:copy-of select="$entry"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:apply-templates mode="htmlTable" select=".">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
select="$entries/entry[@colstart=$colnum]/@colend + 1"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="rownum" select="$rownum"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colspec" select="$colspec"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="entries" select="$entries"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
</xsl:when><xsl:otherwise>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="colstart" select="$colnum"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="colend">
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="@colspan">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="@colspan + $colnum -1"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$colnum"/>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="rowend">
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="@rowspan">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="@rowspan + $rownum -1"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$rownum"/>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="rowcolor" select="parent::tr/@bgcolor"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="col" select="$colspec/colspec[@colnum=$colstart]"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="bgcolor">
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="$rowcolor != ''">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$rowcolor"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="$col/@bgcolor">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$col/@bgcolor"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="ancestor::*[@bgcolor]">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="ancestor::*[@bgcolor][last()]/@bgcolor"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="valign">
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="../@valign">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="../@valign"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="$col/@valign">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$col/@valign"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="ancestor::*[@valign]">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="ancestor::*[@valign][last()]/@valign"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="align">
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="../@align">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="../@align"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="$col/@align">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$col/@align"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="ancestor::*[@align]">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="ancestor::*[@align][last()]/@align"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<entry>
|
|
Packit Service |
76cb02 |
<xsl:for-each select="@*"><xsl:copy/></xsl:for-each>
|
|
Packit Service |
76cb02 |
<xsl:attribute name="colstart">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$colstart"/>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
<xsl:attribute name="colend">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$colend"/>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
<xsl:attribute name="rowstart">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$rownum"/>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
<xsl:attribute name="rowend">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$rowend"/>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
<xsl:if test="$rowend > $rownum">
|
|
Packit Service |
76cb02 |
<xsl:attribute name="morerows">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$rowend - $rownum"/>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
</xsl:if>
|
|
Packit Service |
76cb02 |
<xsl:if test="$col/@colsep = 1">
|
|
Packit Service |
76cb02 |
<xsl:attribute name="colsep">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="1"/>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
</xsl:if>
|
|
Packit Service |
76cb02 |
<xsl:if test="not(@bgcolor) and $bgcolor != ''">
|
|
Packit Service |
76cb02 |
<xsl:attribute name="bgcolor">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$bgcolor"/>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
</xsl:if>
|
|
Packit Service |
76cb02 |
<xsl:if test="not(@valign) and $valign != ''">
|
|
Packit Service |
76cb02 |
<xsl:attribute name="valign">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$valign"/>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
</xsl:if>
|
|
Packit Service |
76cb02 |
<xsl:if test="not(@align) and $align != ''">
|
|
Packit Service |
76cb02 |
<xsl:attribute name="align">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$align"/>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
</xsl:if>
|
|
Packit Service |
76cb02 |
<xsl:element name="output">
|
|
Packit Service |
76cb02 |
<xsl:apply-templates select="." mode="output"/>
|
|
Packit Service |
76cb02 |
</xsl:element>
|
|
Packit Service |
76cb02 |
</entry>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="following-sibling::*[self::td or self::th]">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
select="following-sibling::*[self::td or self::th][1]"
|
|
Packit Service |
76cb02 |
mode="htmlTable">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colspec" select="$colspec"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="rownum" select="$rownum"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colnum" select="$colend + 1"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="entries" select="$entries"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="$colend < $cols">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:call-template name="tbl.blankentry">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colnum" select="$colend + 1"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colend" select="$cols"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colspec" select="$colspec"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="rownum" select="$rownum"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="entries" select="$entries"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="rowcolor" select="$rowcolor"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:otherwise></xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:if>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template match="td|th" mode="output">
|
|
Packit Service |
76cb02 |
<xsl:call-template name="normalize-border">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="string">
|
|
Packit Service |
76cb02 |
<xsl:apply-templates/>
|
|
Packit Service |
76cb02 |
</xsl:with-param>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template match="tr" mode="span">
|
|
Packit Service |
76cb02 |
<xsl:param name="currow"/>
|
|
Packit Service |
76cb02 |
<xsl:variable name="tr.pos" select="position()"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
$currow]"/>
|
|
Packit Service |
76cb02 |
<xsl:if test="$spantds">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:attribute name="value">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
select="sum($spantds/@colspan)+count($spantds[not(@colspan)])"/>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
</xsl:if>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template name="widest-html-row">
|
|
Packit Service |
76cb02 |
<xsl:param name="rows" select="''"/>
|
|
Packit Service |
76cb02 |
<xsl:param name="count" select="0"/>
|
|
Packit Service |
76cb02 |
<xsl:param name="currow" select="1"/>
|
|
Packit Service |
76cb02 |
<xsl:variable name="row" select="$rows[position()=$currow]"/>
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="not($row)">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$count"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:variable name="count1" select="count($row/*[not(@colspan)])"/>
|
|
Packit Service |
76cb02 |
<xsl:variable name="count2" select="sum($row/*/@colspan)"/>
|
|
Packit Service |
76cb02 |
<xsl:variable name="countn" select="$count1 + $count2"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
that span over the current row -->
|
|
Packit Service |
76cb02 |
<xsl:variable name="spantds">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
select="$rows[position() < $currow]"
|
|
Packit Service |
76cb02 |
mode="span">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="currow" select="$currow"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
select="sum(exsl:node-set($spantds)/*/@value)"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<foo> <xsl:copy-of select="$spantds"/> </foo>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:message>
|
|
Packit Service |
76cb02 |
<xsl:text>p=</xsl:text><xsl:value-of select="$currow"/>
|
|
Packit Service |
76cb02 |
<xsl:text> c=</xsl:text><xsl:value-of select="$count"/>
|
|
Packit Service |
76cb02 |
<xsl:text> s=</xsl:text><xsl:value-of select="$addcols"/>
|
|
Packit Service |
76cb02 |
</xsl:message>
|
|
Packit Service |
76cb02 |
-->
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="$count > ($countn + $addcols)">
|
|
Packit Service |
76cb02 |
<xsl:call-template name="widest-html-row">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="rows" select="$rows"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="count" select="$count"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="currow" select="$currow + 1"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:call-template name="widest-html-row">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="rows" select="$rows"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="count" select="$countn + $addcols"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="currow" select="$currow + 1"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template name="build.colwidth">
|
|
Packit Service |
76cb02 |
<xsl:param name="colspec"/>
|
|
Packit Service |
76cb02 |
<xsl:param name="rows"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:for-each select="$colspec/*">
|
|
Packit Service |
76cb02 |
<xsl:variable name="pos" select="position()"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
select="$rows/row/entry[@colstart <= $pos and
|
|
Packit Service |
76cb02 |
@colend >= $pos][@width]"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="pct">
|
|
Packit Service |
76cb02 |
<xsl:call-template name="max.percent">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="entries" select="$colentries"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="maxpct">
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="substring(@width,string-length(@width))='%'">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="number(substring-before(@width, '%'))"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="0"/>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:with-param>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
<xsl:variable name="fixed">
|
|
Packit Service |
76cb02 |
<xsl:call-template name="max.value">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="entries" select="$colentries"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="maxval">
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="string(number(@width))!='NaN'">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="number(@width)"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="0"/>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:with-param>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
<xsl:variable name="star">
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="substring(@width,string-length(@width))='*'">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="number(substring-before(@width, '*'))"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
signify a missing star -->
|
|
Packit Service |
76cb02 |
<xsl:value-of select="-1"/>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:message>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$pos"/>
|
|
Packit Service |
76cb02 |
<xsl:text>, </xsl:text>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="count($colentries)"/>
|
|
Packit Service |
76cb02 |
<xsl:text> pct=</xsl:text><xsl:value-of select="$pct"/>
|
|
Packit Service |
76cb02 |
<xsl:text> val=</xsl:text><xsl:value-of select="$fixed"/>
|
|
Packit Service |
76cb02 |
<xsl:text> star=</xsl:text><xsl:value-of select="$star"/>
|
|
Packit Service |
76cb02 |
</xsl:message>
|
|
Packit Service |
76cb02 |
-->
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:copy>
|
|
Packit Service |
76cb02 |
<xsl:for-each select="@*"><xsl:copy/></xsl:for-each>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:when test="$star = 0">
|
|
Packit Service |
76cb02 |
<xsl:attribute name="autowidth">1</xsl:attribute>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:attribute name="colwidth">
|
|
Packit Service |
76cb02 |
<xsl:text>\newtblstarfactor</xsl:text>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
<xsl:attribute name="star">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="1"/>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="$star > 0">
|
|
Packit Service |
76cb02 |
<xsl:attribute name="colwidth">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$star"/>
|
|
Packit Service |
76cb02 |
<xsl:text>\newtblstarfactor</xsl:text>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
<xsl:attribute name="star">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$star"/>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="$pct > 0">
|
|
Packit Service |
76cb02 |
<xsl:variable name="width">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$pct div 100"/>
|
|
Packit Service |
76cb02 |
<xsl:text>\tablewidth</xsl:text>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
<xsl:attribute name="fixedwidth">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$width"/>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
<xsl:attribute name="colwidth">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$width"/>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="$fixed > 0">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="width">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$fixed"/>
|
|
Packit Service |
76cb02 |
<xsl:text>pt</xsl:text>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
<xsl:attribute name="fixedwidth">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$width"/>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
<xsl:attribute name="colwidth">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$width"/>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:if test="@width != ''">
|
|
Packit Service |
76cb02 |
<xsl:message>
|
|
Packit Service |
76cb02 |
<xsl:text>Warning: Unrecognized width attribute (</xsl:text>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="@width"/>
|
|
Packit Service |
76cb02 |
<xsl:text>) in column of HTML table</xsl:text>
|
|
Packit Service |
76cb02 |
</xsl:message>
|
|
Packit Service |
76cb02 |
</xsl:if>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:attribute name="colwidth">
|
|
Packit Service |
76cb02 |
<xsl:text>\newtblstarfactor</xsl:text>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
<xsl:attribute name="star">1</xsl:attribute>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:copy>
|
|
Packit Service |
76cb02 |
</xsl:for-each>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template name="max.percent">
|
|
Packit Service |
76cb02 |
<xsl:param name="entries"/>
|
|
Packit Service |
76cb02 |
<xsl:param name="maxpct" select="0"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="$entries">
|
|
Packit Service |
76cb02 |
<xsl:variable name="width" select="$entries[1]/@width"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="newpct">
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="substring($width,string-length($width))='%'">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
select="number(substring-before($width, '%'))"/>
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="$pct > $maxpct">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$pct"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$maxpct"/>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$maxpct"/>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
<xsl:call-template name="max.percent">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="maxpct" select="$newpct"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="entries" select="$entries[position() > 1]"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$maxpct"/>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template name="max.value">
|
|
Packit Service |
76cb02 |
<xsl:param name="entries"/>
|
|
Packit Service |
76cb02 |
<xsl:param name="maxval" select="0"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="$entries">
|
|
Packit Service |
76cb02 |
<xsl:variable name="width" select="$entries[1]/@width"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="newval">
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="string(number($width))!='NaN'">
|
|
Packit Service |
76cb02 |
<xsl:variable name="val" select="number($width)"/>
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="$val > $maxval">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$val"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$maxval"/>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$maxval"/>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
<xsl:call-template name="max.value">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="maxval" select="$newval"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="entries" select="$entries[position() > 1]"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$maxval"/>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
-->
|
|
Packit Service |
76cb02 |
<xsl:template name="make.colspec.default">
|
|
Packit Service |
76cb02 |
<xsl:param name="colmax"/>
|
|
Packit Service |
76cb02 |
<xsl:param name="colnum"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:if test="$colnum <= $colmax">
|
|
Packit Service |
76cb02 |
<colspec>
|
|
Packit Service |
76cb02 |
<xsl:attribute name="colnum">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$colnum"/>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
<xsl:call-template name="html.table.column.rules">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colnum" select="$colnum"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colmax" select="$colmax"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</colspec>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:call-template name="make.colspec.default">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colnum" select="$colnum + 1"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colmax" select="$colmax"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</xsl:if>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
and use default colspec for undefined s in order to have a colspec
|
|
Packit Service |
76cb02 |
per actual column.
|
|
Packit Service |
76cb02 |
-->
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template match="colgroup" mode="make.colspec">
|
|
Packit Service |
76cb02 |
<xsl:param name="done" select="0"/>
|
|
Packit Service |
76cb02 |
<xsl:param name="colnum"/>
|
|
Packit Service |
76cb02 |
<xsl:param name="colmax"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="col">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:apply-templates select="col[1]" mode="make.colspec">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colnum" select="$colnum"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colmax" select="$colmax"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="span">
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="@span">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="@span"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="1"/>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="$done < $span">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="bgcolor">
|
|
Packit Service |
76cb02 |
<xsl:call-template name="pi.dblatex_bgcolor"/>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<colspec>
|
|
Packit Service |
76cb02 |
<xsl:for-each select="@*"><xsl:copy/></xsl:for-each>
|
|
Packit Service |
76cb02 |
<xsl:attribute name="colnum">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$colnum"/>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
<xsl:if test="$bgcolor != ''">
|
|
Packit Service |
76cb02 |
<xsl:attribute name="bgcolor"><xsl:value-of select="$bgcolor"/>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
</xsl:if>
|
|
Packit Service |
76cb02 |
<xsl:call-template name="html.table.column.rules">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colnum" select="$colnum"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colmax" select="$colmax"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</colspec>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:apply-templates select="." mode="make.colspec">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="done" select="$done + 1"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colnum" select="$colnum + 1"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colmax" select="$colmax"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="following-sibling::*[self::colgroup or self::col]">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
self::col][1]"
|
|
Packit Service |
76cb02 |
mode="make.colspec">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colnum" select="$colnum"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colmax" select="$colmax"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:when test="$colnum <= $colmax">
|
|
Packit Service |
76cb02 |
<xsl:call-template name="make.colspec.default">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colmax" select="$colmax"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colnum" select="$colnum"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template match="col" mode="make.colspec">
|
|
Packit Service |
76cb02 |
<xsl:param name="done" select="0"/>
|
|
Packit Service |
76cb02 |
<xsl:param name="colnum"/>
|
|
Packit Service |
76cb02 |
<xsl:param name="colmax"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:message>
|
|
Packit Service |
76cb02 |
<xsl:text>p=</xsl:text>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="local-name()"/>
|
|
Packit Service |
76cb02 |
<xsl:text> </xsl:text>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="generate-id()"/>
|
|
Packit Service |
76cb02 |
<xsl:text> r=</xsl:text>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$colnum"/>
|
|
Packit Service |
76cb02 |
</xsl:message>
|
|
Packit Service |
76cb02 |
-->
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="span">
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="@span">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="@span"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="1"/>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:when test="$done < $span">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:variable name="bgcolor.pi">
|
|
Packit Service |
76cb02 |
<xsl:call-template name="pi.dblatex_bgcolor"/>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
<xsl:variable name="bgcolor">
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="$bgcolor.pi != ''">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$bgcolor.pi"/>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:call-template name="pi.dblatex_bgcolor">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="node" select="parent::colgroup"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:variable>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<colspec>
|
|
Packit Service |
76cb02 |
<xsl:for-each select="parent::colgroup/@*"><xsl:copy/></xsl:for-each>
|
|
Packit Service |
76cb02 |
<xsl:for-each select="@*"><xsl:copy/></xsl:for-each>
|
|
Packit Service |
76cb02 |
<xsl:attribute name="colnum">
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$colnum"/>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
<xsl:if test="$bgcolor != ''">
|
|
Packit Service |
76cb02 |
<xsl:attribute name="bgcolor"><xsl:value-of select="$bgcolor"/>
|
|
Packit Service |
76cb02 |
</xsl:attribute>
|
|
Packit Service |
76cb02 |
</xsl:if>
|
|
Packit Service |
76cb02 |
<xsl:call-template name="html.table.column.rules">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colnum" select="$colnum"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colmax" select="$colmax"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</colspec>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:apply-templates select="." mode="make.colspec">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="done" select="$done + 1"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colnum" select="$colnum + 1"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colmax" select="$colmax"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:when test="following-sibling::*[self::colgroup or self::col]">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
select="following-sibling::*[self::col or self::colgroup][1]"
|
|
Packit Service |
76cb02 |
mode="make.colspec">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colnum" select="$colnum"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colmax" select="$colmax"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
level -->
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
self::col]]">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
following-sibling::*[self::col or
|
|
Packit Service |
76cb02 |
self::colgroup][1]"
|
|
Packit Service |
76cb02 |
mode="make.colspec">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colnum" select="$colnum"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colmax" select="$colmax"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:when test="$colnum <= $colmax">
|
|
Packit Service |
76cb02 |
<xsl:call-template name="make.colspec.default">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colmax" select="$colmax"/>
|
|
Packit Service |
76cb02 |
<xsl:with-param name="colnum" select="$colnum"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
</xsl:stylesheet>
|