I’m trying to use a .xsl file so that it will return a HTML table of the XML document. I have no experience with this and it is something I’ve not done before so it’s probably this is just a simple mistake.
I have the following code for my podcatalog.xsl
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Tranform">
<xsl:template match="/">
<html>
<body>
<h2>Pods Papers</h2>
<table border="1">
<tr bgcolor="#9ACD32">
<th>Author</th>
<th>Title</th>
<th>Pages</th>
<th>Year</th>
</tr>
<xsl:for-each select="pods-papers/inproceedings">
<tr>
<td><xsl:value-of select="author"/></td>
<td><xsl:value-of select="title"/></td>
<td><xsl:value-of select="pages"/></td>
<td><xsl:value-of select="year"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
And the podcatalog.xml can be found here
The error I am getting is: “Error loading stylesheet: Parsing an XSLT stylesheet failed.”
Change:
to:
‘key’ is an attribute of element