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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

html tables 1

Status
Not open for further replies.

xslnew1

Technical User
May 28, 2007
10
DE
Hi,

could someone help me out creating an stylesheet to create an table for an html output.

Here is an example :

<Client>
<Access time = "10.00" location ="server"> A </Access>
<Access time = "10.01" location ="server"> B </Access>
<Access time = "10.02" location ="server"> C </Access>
</Client>

I would like to get an table,

Access Server
FirstAccess A
SecondAccess B
ThirdAccess C

Many thanks in advance
 
hi again,
i´m still not getting my desired result, hope
someone has an idea .

<xsl:template match="/">
<html>
<body>
<h2>Test</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th align="left">Access</th>
<th align="left">Server</th>
</tr>
<xsl:for-each select="client">
<tr>
<td><xsl:value-of select="Access"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

I have an table but cant fill the table.

thanks in advance
 
[1]
><xsl:for-each select="client">
[tt]<xsl:for-each select="[red]C[/red]lient[blue]/Access[/blue]">[/tt]
[2]
><td><xsl:value-of select="Access"/></td>
[tt]<td><xsl:value-of select="position()"/></td>
<td><xsl:value-of select="."/></td>
[/tt]
 
thank you very much,
I just have one question,
how can I put "Firs Access" Second Access" and "Third Access" on the left side of the table ?
 
You can but you shouldn't do it. Change the header to for instance Access Serial or something similar. There is no magic function to take 1 and output first etc. You can do it with a kind of dictionary (a lookup table) of correspondence. It can be placed in the xslt document. But, in this instance, why do something counter-productive.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top