Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

borders

Status
Not open for further replies.

mrp9090

Programmer
May 22, 2006
71
GB
Is it possible to create a table with gridlines like a .NET control, rather than just setting the border to greater than 0?

Here is the XSLT I am trying to do this with :

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl=" xmlns:asp="Remove">
<xsl:template match="Users">
<html>
<title>XSL Transformation</title>
<body>
<table width="100%" height="0" cellspacing="1" cellpadding="0">
<tr bgcolor="#ff0000">
<td background="images/ListHeaderRed.jpg" width="70px">
<font size="2px" color="#ffffff" family="verdana">
<b>User Key</b>
</font>
</td>
<td background="images/ListHeaderRed.jpg" width="100px">
<font size="2px" color="#ffffff" family="verdana">
<b>Team Manager</b>
</font>
</td>
<td background="images/ListHeaderRed.jpg" width="70px">
<font size="2px" color="#ffffff" family="verdana">
<b>Team Type</b>
</font>
</td>
<td background="images/ListHeaderRed.jpg" width="100px">
<font size="2px" color="#ffffff" family="verdana">
<b>Territory Code</b>
</font>
</td>
<td background="images/ListHeaderRed.jpg" width="70px">
<font size="2px" color="#ffffff" family="verdana">
<b>User Name</b>
</font>
</td>
<td background="images/ListHeaderRed.jpg" width="70px">
<font size="2px" color="#ffffff" family="verdana">
<b>User Login</b>
</font>
</td>
</tr>
<xsl:for-each select="row">
<xsl:choose>
<!--Returns the index position of the node that is currently being processed
Example: //book[position()<=3]
Result: Selects the first three book elements-->
<xsl:when test="position() mod 2 = 0">
<tr bgcolor="#d3d3d3">
<td>
<xsl:value-of select="@UserKey"/>
</td>
<td>
<xsl:value-of select="@TeamManager"/>
</td>
<td>
<xsl:value-of select="@TeamType"/>
</td>
<td>
<xsl:value-of select="@TerritoryCode"/>
</td>
<td>
<xsl:value-of select="@UserName" />
</td>
<td>
<xsl:value-of select="@UserLogin" />
</td>
</tr>
</xsl:when>
<xsl:eek:therwise>
<tr bgcolor="#f5f5f5">
<td>
<xsl:value-of select="@UserKey"/>
</td>
<td>
<xsl:value-of select="@TeamManager"/>
</td>
<td>
<xsl:value-of select="@TeamType"/>
</td>
<td>
<xsl:value-of select="@TerritoryCode"/>
</td>
<td>
<xsl:value-of select="@UserName" />
</td>
<td>
<xsl:value-of select="@UserLogin" />
</td>
</tr>
</xsl:eek:therwise>
</xsl:choose>
</xsl:for-each>
</table>
</body>
</html>

</xsl:template>
</xsl:stylesheet>
 
You should probably pose this as an HTML question in a more appropraite forum. The use of XSLT is entirely incidental to the question you have posed.

Tom Morrison
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top