50
50
<xsl:param name="rowsep" select="''"/>
51
51
<xsl:param name="spanstr"/>
53
<xsl:if test="($row/../self::tbody and (count($row/preceding-sibling::row) mod 2 = 1)) or
54
($row/../self::db:tbody and (count($row/preceding-sibling::db:row) mod 2 = 1))">
55
<xsl:attribute name="class">
56
<xsl:text>shade</xsl:text>
53
<xsl:call-template name="html.class.attr">
54
<xsl:with-param name="node" select="$row"/>
55
<xsl:with-param name="class">
56
<xsl:if test="($row/../self::tbody and (count($row/preceding-sibling::row) mod 2 = 1)) or
57
($row/../self::db:tbody and (count($row/preceding-sibling::db:row) mod 2 = 1))">
58
<xsl:text>shade</xsl:text>
59
62
<xsl:if test="$row/*[1]">
60
63
<xsl:call-template name="db2html.entry">
61
64
<xsl:with-param name="entry" select="$row/*[1]"/>
424
427
<xsl:call-template name="html.lang.attrs">
425
428
<xsl:with-param name="parent" select=".."/>
426
429
</xsl:call-template>
430
<xsl:call-template name="html.class.attr">
431
<xsl:with-param name="node" select="$entry"/>
432
<xsl:with-param name="class" select="$class"/>
427
434
<xsl:if test="$style != ''">
428
435
<xsl:attribute name="style">
429
436
<xsl:value-of select="normalize-space($style)"/>
432
<xsl:if test="$class != ''">
433
<xsl:attribute name="class">
434
<xsl:value-of select="normalize-space($class)"/>
437
439
<xsl:if test="number($rowspan) > 1">
438
440
<xsl:attribute name="rowspan">
439
441
<xsl:value-of select="$rowspan"/>
976
979
<!-- = table = -->
977
980
<xsl:template match="table | informaltable | db:table | db:informaltable">
981
<xsl:variable name="if"><xsl:call-template name="db.profile.test"/></xsl:variable>
982
<xsl:if test="$if != ''">
984
<xsl:call-template name="html.class.attr">
985
<xsl:with-param name="class" select="'table'"/>
979
987
<xsl:call-template name="html.lang.attrs"/>
980
988
<xsl:call-template name="db2html.anchor"/>
981
989
<xsl:apply-templates select="title | db:title | db:info/db:title"/>
993
1001
<xsl:when test="db:tgroup">
994
1002
<xsl:apply-templates select="db:tgroup"/>
997
<xsl:apply-templates select="col | colgroup | tr"/>
998
<xsl:apply-templates select="caption"/>
1000
<xsl:when test="db:tr">
1001
<xsl:apply-templates select="db:col | db:colgroup | db:tr"/>
1002
<xsl:apply-templates select="db:caption"/>
1004
1004
<xsl:otherwise>
1005
<xsl:apply-templates select="thead | db:thead"/>
1006
<xsl:apply-templates select="tbody | db:tbody"/>
1007
<xsl:apply-templates select="tfoot | db:tfoot"/>
1005
<xsl:call-template name="db2html.table.table">
1006
<xsl:with-param name="node" select="."/>
1007
<xsl:with-param name="table" select="."/>
1008
</xsl:call-template>
1008
1009
<xsl:apply-templates select="caption | db:caption"/>
1009
1010
</xsl:otherwise>
1012
1014
</xsl:template>
1014
1016
<!-- = tgroup = -->
1015
1017
<xsl:template match="tgroup | db:tgroup">
1018
<xsl:call-template name="db2html.table.table">
1019
<xsl:with-param name="node" select="."/>
1020
<xsl:with-param name="table" select=".."/>
1021
</xsl:call-template>
1024
<xsl:template name="db2html.table.table">
1025
<xsl:param name="node" select="."/>
1026
<xsl:param name="table" select="$node"/>
1016
1027
<xsl:variable name="colsep">
1018
<xsl:when test="@colsep">
1019
<xsl:value-of select="string(@colsep)"/>
1029
<xsl:when test="$node/@colsep">
1030
<xsl:value-of select="string($node/@colsep)"/>
1021
<xsl:when test="not(.//*[@colsep][1])"/>
1032
<xsl:when test="not($node//*[@colsep][1])"/>
1022
1033
<xsl:otherwise>
1023
1034
<xsl:text>0</xsl:text>
1024
1035
</xsl:otherwise>
1026
1037
</xsl:variable>
1027
1038
<xsl:variable name="rowsep">
1029
<xsl:when test="@rowsep">
1030
<xsl:value-of select="string(@rowsep)"/>
1040
<xsl:when test="$node/@rowsep">
1041
<xsl:value-of select="string($node/@rowsep)"/>
1032
<xsl:when test="not(//*[@rowsep][1])"/>
1043
<xsl:when test="not($node//*[@rowsep][1])"/>
1033
1044
<xsl:otherwise>
1034
1045
<xsl:text>0</xsl:text>
1035
1046
</xsl:otherwise>
1037
1048
</xsl:variable>
1038
1049
<xsl:variable name="style">
1039
<xsl:if test="../@frame = 'all' or not(../@frame)">
1050
<xsl:if test="$table/@frame = 'all' or $table/@frame = 'border' or not($table/@frame)">
1040
1051
<xsl:text>border: solid 1px; </xsl:text>
1042
<xsl:if test="../@frame = 'none'">
1053
<xsl:if test="$table/@frame = 'none'">
1043
1054
<xsl:text>border: none; </xsl:text>
1045
<xsl:if test="../@frame = 'bottom' or ../@frame = 'topbot'">
1056
<xsl:if test="$table/@frame = 'bottom' or $table/@frame = 'topbot'">
1046
1057
<xsl:text>border-bottom: solid 1px; </xsl:text>
1048
<xsl:if test="../@frame = 'top' or ../@frame = 'topbot'">
1059
<xsl:if test="$table/@frame = 'top' or $table/@frame = 'topbot'">
1049
1060
<xsl:text>border-top: solid 1px; </xsl:text>
1051
<xsl:if test="../@frame = 'sides'">
1062
<xsl:if test="$table/@frame = 'sides'">
1052
1063
<xsl:text>border-left: solid 1px; border-right: solid 1px; </xsl:text>
1054
1065
</xsl:variable>
1055
1066
<xsl:variable name="class">
1056
<xsl:if test="../@pgwide = '1'">
1067
<xsl:if test="$table/@pgwide = '1'">
1057
1068
<xsl:text>table-pgwide</xsl:text>
1070
<xsl:if test="$table/@rules = 'groups'">
1071
<xsl:text> table-rules-groups</xsl:text>
1073
<xsl:if test="$table/@rules = 'rows'">
1074
<xsl:text> table-rules-rows</xsl:text>
1076
<xsl:if test="$table/@rules = 'cols'">
1077
<xsl:text> table-rules-cols</xsl:text>
1079
<xsl:if test="$table/@rules = 'all'">
1080
<xsl:text> table-rules-rows table-rules-cols</xsl:text>
1059
1082
</xsl:variable>
1061
<xsl:call-template name="html.lang.attrs"/>
1062
<xsl:if test="../title or ../db:title or ../db:info/db:title">
1084
<xsl:call-template name="html.class.attr">
1085
<xsl:with-param name="node" select="$node"/>
1086
<xsl:with-param name="class" select="$class"/>
1087
</xsl:call-template>
1088
<xsl:call-template name="html.lang.attrs">
1089
<xsl:with-param name="node" select="$node"/>
1090
</xsl:call-template>
1091
<xsl:if test="$table/title or $table/db:title or $table/db:info/db:title">
1063
1092
<xsl:attribute name="summary">
1064
<xsl:value-of select="../title | ../db:title | ../db:info/db:title"/>
1093
<xsl:value-of select="$table/title | $table/db:title | $table/db:info/db:title"/>
1065
1094
</xsl:attribute>
1067
1096
<xsl:if test="$style != ''">
1069
1098
<xsl:value-of select="normalize-space($style)"/>
1070
1099
</xsl:attribute>
1072
<xsl:if test="$class != ''">
1073
<xsl:attribute name="class">
1074
<xsl:value-of select="normalize-space($class)"/>
1077
<xsl:apply-templates select="thead | db:thead">
1078
<xsl:with-param name="colspecs" select="colspec | db:colspec"/>
1079
<xsl:with-param name="spanspecs" select="spanspec | db:spanspec"/>
1080
<xsl:with-param name="colsep" select="$colsep"/>
1081
<xsl:with-param name="rowsep" select="$rowsep"/>
1082
</xsl:apply-templates>
1083
<xsl:apply-templates select="tbody | db:tbody">
1084
<xsl:with-param name="colspecs" select="colspec | db:colspec"/>
1085
<xsl:with-param name="spanspecs" select="spanspec | db:spanspec"/>
1086
<xsl:with-param name="colsep" select="$colsep"/>
1087
<xsl:with-param name="rowsep" select="$rowsep"/>
1088
</xsl:apply-templates>
1089
<xsl:apply-templates select="tfoot | db:tfoot">
1090
<xsl:with-param name="colspecs" select="colspec | db:colspec"/>
1091
<xsl:with-param name="spanspecs" select="spanspec | db:spanspec"/>
1092
<xsl:with-param name="colsep" select="$colsep"/>
1093
<xsl:with-param name="rowsep" select="$rowsep"/>
1094
</xsl:apply-templates>
1102
<xsl:when test="tr | db:tr">
1104
<xsl:apply-templates select="$node/tr | $node/db:tr">
1105
<xsl:with-param name="colsep" select="$colsep"/>
1106
<xsl:with-param name="rowsep" select="$rowsep"/>
1107
</xsl:apply-templates>
1111
<xsl:apply-templates select="$node/thead | $node/db:thead">
1112
<xsl:with-param name="colspecs" select="$node/colspec | $node/db:colspec"/>
1113
<xsl:with-param name="spanspecs" select="$node/spanspec | $node/db:spanspec"/>
1114
<xsl:with-param name="colsep" select="$colsep"/>
1115
<xsl:with-param name="rowsep" select="$rowsep"/>
1116
</xsl:apply-templates>
1117
<xsl:apply-templates select="$node/tbody | $node/db:tbody">
1118
<xsl:with-param name="colspecs" select="$node/colspec | $node/db:colspec"/>
1119
<xsl:with-param name="spanspecs" select="$node/spanspec | $node/db:spanspec"/>
1120
<xsl:with-param name="colsep" select="$colsep"/>
1121
<xsl:with-param name="rowsep" select="$rowsep"/>
1122
</xsl:apply-templates>
1123
<xsl:apply-templates select="$node/tfoot | $node/db:tfoot">
1124
<xsl:with-param name="colspecs" select="$node/colspec | $node/db:colspec"/>
1125
<xsl:with-param name="spanspecs" select="$node/spanspec | $node/db:spanspec"/>
1126
<xsl:with-param name="colsep" select="$colsep"/>
1127
<xsl:with-param name="rowsep" select="$rowsep"/>
1128
</xsl:apply-templates>
1096
1132
</xsl:template>
1138
1175
</xsl:template>
1178
<xsl:template match="tr | db:tr">
1180
<xsl:call-template name="html.lang.attrs"/>
1181
<xsl:call-template name="html.class.attr"/>
1183
<xsl:when test="@align = 'left' or @align = 'center' or
1184
@align = 'right' or @align = 'justify' ">
1185
<xsl:attribute name="style">
1186
<xsl:text>text-align: </xsl:text>
1187
<xsl:value-of select="@align"/>
1190
<xsl:when test="@align = 'char'">
1191
<xsl:attribute name="style">
1192
<xsl:text>text-align: "</xsl:text>
1194
<xsl:when test="@char != ''">
1195
<xsl:value-of select="@char"/>
1198
<xsl:text>.</xsl:text>
1201
<xsl:text>"</xsl:text>
1205
<xsl:apply-templates/>
1209
<!-- = td | th = -->
1210
<xsl:template match="td | th | db:td | db:th">
1211
<xsl:element name="{local-name(.)}" namespace="{$html.namespace}">
1212
<xsl:call-template name="html.lang.attrs"/>
1213
<xsl:call-template name="html.class.attr"/>
1214
<xsl:copy-of select="@valign | @rowspan | @colspan"/>
1216
<xsl:when test="@align = 'left' or @align = 'center' or
1217
@align = 'right' or @align = 'justify' ">
1218
<xsl:attribute name="style">
1219
<xsl:text>text-align: </xsl:text>
1220
<xsl:value-of select="@align"/>
1223
<xsl:when test="@align = 'char'">
1224
<xsl:attribute name="style">
1225
<xsl:text>text-align: "</xsl:text>
1227
<xsl:when test="@char != ''">
1228
<xsl:value-of select="@char"/>
1231
<xsl:text>.</xsl:text>
1234
<xsl:text>"</xsl:text>
1238
<xsl:apply-templates/>
1140
1243
</xsl:stylesheet>