radiomanifest-spec/shows-table.xsl
2022-01-20 22:24:33 +01:00

43 lines
1.8 KiB
XML

<?xml version="1.0"?>
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<title>Shows list</title>
<style type="text/css">
table, th, td { border: 1px solid black; border-collapse: collapse; }
th, td { padding: 0.3em; }
thead { background-color: #ccc; }
</style>
</head>
<body>
<table>
<thead>
<tr>
<th>Name</th>
<th>Website</th>
<th>Feed</th>
<th>Schedule</th>
</tr>
</thead>
<tbody>
<xsl:for-each select="shows/show">
<tr>
<xsl:variable name="name" select="name"/>
<xsl:variable name="website" select="website"/>
<xsl:variable name="feed" select="feed"/>
<xsl:variable name="schedule" select="schedule"/>
<td><xsl:value-of select="name" /></td>
<td><a href="{$website}"><xsl:value-of select="website" /></a></td>
<td><a href="{$feed}"><xsl:value-of select="feed" /></a></td>
<td><a href="{$schedule}"><xsl:value-of select="schedule" /></a></td>
</tr>
</xsl:for-each>
</tbody>
</table>
</body>
</html>
</xsl:template>
</xsl:transform>