Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - RE: table width ignored table width ignoredTo: NULL Date: 12/5/2006 7:24:00 AM
Hi,
I would like to be able to set the width of a table. Using the xsl
below it does not work and the first row is on a single line, hence is
very wide (above the width value specified). It appears that using
"<xsl:value-of select="somexmltag"/>" screws up the width setting on
the table, see below.
Suggestions greatly appreciated.
Lee
The applicable xsl code is as follows:
.sectionTableBorderSub
{
width:400px;
}
.tableHdr
{
border-width : 1pt;
border-style : solid;
border-color : black;
font-weight : bold;
text-align : center;
background-color: #CFCFCF;
}
.tableData
{
border-width : 1pt;
border-style : solid;
border-color : black;
text-align : right;
background-color: #EFEFEF;
vertical-align : top;
}
<xsl:template match="/SOURCE/SUBROUTINE_CALLS">
<H2>Subroutine Calls</H2>
<xsl:if test="count(SUB_CALL) > 0">
<P><B>These are the subroutine calls within this
unit.</B></P>
<TABLE CLASS="sectionTableBorderSub" FRAME="BORDER">
<TR>
<TD>Unit Name Unit Name Unit NameUnit NameUnit NameUnit NameUnit
NameUnit NameUnit NameUnit NameUnit NameUnit NameUnit NameUnit NameUnit
NameUnit NameUnit NameUnit NameUnit Name</TD>
<TD CLASS="tableHdr">Call Address</TD>
</TR>
<xsl:apply-templates select="SUB_CALL" />
</TABLE>
</xsl:if>
</xsl:template>
<xsl:template match="SUB_CALL">
<TR>
<TD CLASS="tableData"><xsl:value-of
select="subroutineName"/> </TD>
<TD CLASS="tableData"><xsl:value-of
select="callAddress"/> </TD>
</TR>
</xsl:template>
When I replace
<TD CLASS="tableData"><xsl:value-of select="subroutineName"/> </TD>
<TD CLASS="tableData"><xsl:value-of select="callAddress"/> </TD>
with
<TD CLASS="tableData">hard coded text</TD>
<TD CLASS="tableData">hard coded text</TD>
then the width is controlled as I wish.
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
