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

xml and xslt and table

Status
Not open for further replies.

bepepi

Technical User
Jul 9, 2002
10
DE
hey there,
it`s a shame,but i have no idea how to solve my problem.
i`ve done an example from the w3.tutorial that display a table with two columns, but when i try it shows only one column.
i`m using netscape 6.2 newest version on linux 7.3.
and here, for your amusment; the code
xml:
<?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?>
<?xml-stylesheet type=&quot;text/xsl&quot; href=&quot;test.xsl&quot;?>
<catalog>
<cd>
<title>empire burlesque</title>
<artist>bob dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
</catalog>

and xsl:
<?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?>
<xsl:stylesheet version=&quot;1.0&quot;
xmlns:xsl=&quot;<xsl:template match=&quot;/&quot;>
<html>
<body>
<h2>My cd collection</h2>
<table border=&quot;1&quot;>
<tr bgcolor=&quot;#9acd32&quot;>
<th>Title</th>
<th>Artist</th>
</tr>
<xsl:for-each select=&quot;catalog/cd&quot;>
<tr>
<td><xsl:value-of select=&quot;title&quot;/></td>
<td><xsl:value-of select=&quot;artist&quot;/></td>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

i really don`t know what i`ve done wrong.
please help me!!!!!
thanx bernd
 

apart from the fact u are missing a </for-each> tag it looks fine to me on mine... out put is:

<html>
<body>
<h2>My cd collection</h2>
<table border=&quot;1&quot;>
<tr bgcolor=&quot;#9acd32&quot;>
<th>Title</th>
<th>Artist</th>
</tr>
<tr>
<td>empire burlesque</td>
<td>bob dylan</td>
</tr>
</table>
</body>
</html>

right?

 
hey flumpy,
i`ve added the for-each tag and the output is :
My cd collection in h2
and then comes the table with the right values,but i`m misssing a border for each column. there is only a border for the whole table. when i do the same in html i saw a borderline for each column and row.
and that`s what i want.
do you have any idea? [bigears]
bernd
 
ark, for netscape it`s equal, with or without cellborder=&quot;1&quot; there are no cellborders.
but mozilla does the cellborders, even with or without cellborder=&quot;1&quot;.
ok i could take mozilla to test my files, but i`m wondering why netscape doesn`t behave like mozilla does.
bernd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top