rachelason
Programmer
Hello everyone!,
Though i am new to xml and xslt , i have managed to create an xml file. But when i try to display the information using xsl, it displays only one row of the data. As you can see from the xsl code, i have added <for-each tag aswell. I am not sure what the <xsl:template match >code does and i wonder if that's causing the problem. I have nearly 1000 rows in the xml, but it doesn't display if used with the following xsl. Any help?
Here is the code.
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="<xsl:template match="/">
<html>
<body>
<h2>Tape Profile - File List</h2>
<table border="1">
<tr bgcolor="#006699">
<th align="left">FileName</th>
<th align="left">Fragment</th>
</tr>
<xsl:for-each select="profile">
<tr>
<td><xsl:value-of select="filename"/></td>
<td><xsl:value-of select="fragment"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
thanks
Rachel
Though i am new to xml and xslt , i have managed to create an xml file. But when i try to display the information using xsl, it displays only one row of the data. As you can see from the xsl code, i have added <for-each tag aswell. I am not sure what the <xsl:template match >code does and i wonder if that's causing the problem. I have nearly 1000 rows in the xml, but it doesn't display if used with the following xsl. Any help?
Here is the code.
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="<xsl:template match="/">
<html>
<body>
<h2>Tape Profile - File List</h2>
<table border="1">
<tr bgcolor="#006699">
<th align="left">FileName</th>
<th align="left">Fragment</th>
</tr>
<xsl:for-each select="profile">
<tr>
<td><xsl:value-of select="filename"/></td>
<td><xsl:value-of select="fragment"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
thanks
Rachel