shows-table.xsl 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?xml version="1.0" ?>
  2. <xsl:transform version="1.0"
  3. xmlns:show="https://radiomanifest.degenerazione.xyz/v0.2/shows/"
  4. xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  5. <xsl:template match="/">
  6. <html>
  7. <head>
  8. <title>Shows list</title>
  9. <style type="text/css">
  10. table, th, td { border: 1px solid black; border-collapse: collapse; }
  11. th, td { padding: 0.3em; }
  12. thead { background-color: #ccc; }
  13. </style>
  14. </head>
  15. <body>
  16. <table>
  17. <thead>
  18. <tr>
  19. <th>Name</th>
  20. <th>Description</th>
  21. <th>Website</th>
  22. <th>Feed</th>
  23. <th>Schedule</th>
  24. </tr>
  25. </thead>
  26. <tbody>
  27. <xsl:for-each select="//bookmark/info/metadata">
  28. <tr>
  29. <xsl:variable name="website" select="show:website"/>
  30. <xsl:variable name="feed" select="show:feed"/>
  31. <xsl:variable name="description" select="show:feed"/>
  32. <xsl:variable name="schedule" select="show:schedule"/>
  33. <td><xsl:value-of select="show:name" /></td>
  34. <td><xsl:value-of select="show:description" /></td>
  35. <td><a href="{$website}">Website</a></td>
  36. <td><a href="{$feed}">Feed</a></td>
  37. <td><a href="{$schedule}">Schedule</a></td>
  38. </tr>
  39. </xsl:for-each>
  40. </tbody>
  41. </table>
  42. </body>
  43. </html>
  44. </xsl:template>
  45. </xsl:transform>