Hi all,
having problems with my XML/XSL files.
I have an XML file that contains detaiols of my MP3 collection, it is structured into MP3 Collection/ artist/album/trackname.
I have XSL file that is displaying the date how I want, (Apart from the tracknames, only showing the first)
Wondering if anyone can see what is wrong with the following files:
mp3.xsl:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="
<xsl:template match="/">
<html>
<body>
<h2>MP3 Collection</h2>
<table border="1">
<xsl:for-each select="mp3list/artist">
<tr>
<td>
<xsl:value-of select="artistname"/>
<table border="1" style="margin-left:20px">
<xsl:for-each select="album">
<tr>
<td>
<xsl:value-of select="albumname"/>
<table border="1" style="margin-left:20px">
<xsl:for-each select="track">
<tr>
<td>
<xsl:value-of select="trackname"/>
</td>
</tr>
</xsl:for-each>
</table>
</td>
</tr>
</xsl:for-each>
</table>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
mp3.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="mp3.xsl"?>
<mp3list>
<artist>
<artist>
<artistname>10000 Maniacs</artistname>
<album>
<albumname>In my Tribe</albumname>
<track>
<trackname>01</trackname>
<trackname>02</trackname>
<trackname>03</trackname>
<trackname>04</trackname>
<trackname>05</trackname>
<trackname>06</trackname>
<trackname>07</trackname>
<trackname>08</trackname>
<trackname>09</trackname>
<trackname>10</trackname>
</track>
</album>
</artist>
<artist>
<artistname>AC-DC</artistname>
<album>
<albumname>Back In Black</albumname>
<track>
<trackname>01</trackname>
<trackname>02</trackname>
<trackname>03</trackname>
<trackname>04</trackname>
<trackname>05</trackname>
<trackname>06</trackname>
<trackname>07</trackname>
<trackname>08</trackname>
<trackname>09</trackname>
<trackname>10</trackname>
</track>
</album>
<album>
<albumname>For Those About To Rock</albumname>
<track>
<trackname>01</trackname>
<trackname>02</trackname>
<trackname>03</trackname>
<trackname>04</trackname>
<trackname>05</trackname>
<trackname>06</trackname>
<trackname>07</trackname>
<trackname>08</trackname>
<trackname>09</trackname>
<trackname>10</trackname>
</track>
</album>
</artist>
</mp3list>
Any and all help would be most aprreciated.
Thanks in advance,
Sandy
having problems with my XML/XSL files.
I have an XML file that contains detaiols of my MP3 collection, it is structured into MP3 Collection/ artist/album/trackname.
I have XSL file that is displaying the date how I want, (Apart from the tracknames, only showing the first)
Wondering if anyone can see what is wrong with the following files:
mp3.xsl:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="
<xsl:template match="/">
<html>
<body>
<h2>MP3 Collection</h2>
<table border="1">
<xsl:for-each select="mp3list/artist">
<tr>
<td>
<xsl:value-of select="artistname"/>
<table border="1" style="margin-left:20px">
<xsl:for-each select="album">
<tr>
<td>
<xsl:value-of select="albumname"/>
<table border="1" style="margin-left:20px">
<xsl:for-each select="track">
<tr>
<td>
<xsl:value-of select="trackname"/>
</td>
</tr>
</xsl:for-each>
</table>
</td>
</tr>
</xsl:for-each>
</table>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
mp3.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="mp3.xsl"?>
<mp3list>
<artist>
<artist>
<artistname>10000 Maniacs</artistname>
<album>
<albumname>In my Tribe</albumname>
<track>
<trackname>01</trackname>
<trackname>02</trackname>
<trackname>03</trackname>
<trackname>04</trackname>
<trackname>05</trackname>
<trackname>06</trackname>
<trackname>07</trackname>
<trackname>08</trackname>
<trackname>09</trackname>
<trackname>10</trackname>
</track>
</album>
</artist>
<artist>
<artistname>AC-DC</artistname>
<album>
<albumname>Back In Black</albumname>
<track>
<trackname>01</trackname>
<trackname>02</trackname>
<trackname>03</trackname>
<trackname>04</trackname>
<trackname>05</trackname>
<trackname>06</trackname>
<trackname>07</trackname>
<trackname>08</trackname>
<trackname>09</trackname>
<trackname>10</trackname>
</track>
</album>
<album>
<albumname>For Those About To Rock</albumname>
<track>
<trackname>01</trackname>
<trackname>02</trackname>
<trackname>03</trackname>
<trackname>04</trackname>
<trackname>05</trackname>
<trackname>06</trackname>
<trackname>07</trackname>
<trackname>08</trackname>
<trackname>09</trackname>
<trackname>10</trackname>
</track>
</album>
</artist>
</mp3list>
Any and all help would be most aprreciated.
Thanks in advance,
Sandy