rss.xsl 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?xml version="1.0"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3. <xsl:output method="html" version="5" encoding="UTF-8" indent="yes" />
  4. <xsl:template match="rss">
  5. <html xmlns="http://www.w3.org/1999/xhtml">
  6. <head>
  7. <title><xsl:value-of select="channel/title" />RSS Feed</title>
  8. <meta charset="UTF-8" />
  9. <meta http-equiv="x-ua-compatible" content="IE=edge,chrome=1" />
  10. <meta name="viewport" content="width=device-width,initial-scale=1" />
  11. <link rel="stylesheet" href="{{ url_for('static', filename='css/rss.min.css') }}" type="text/css" media="screen"/>
  12. </head>
  13. <body>
  14. <header>
  15. <h2>
  16. <xsl:value-of select="channel/description" />
  17. </h2>
  18. </header>
  19. <hr />
  20. <main>
  21. <xsl:for-each select="channel/item">
  22. <article>
  23. <h3>
  24. <a hreflang="en" target="_blank">
  25. <xsl:attribute name="href">
  26. <xsl:value-of select="link" />
  27. </xsl:attribute>
  28. <xsl:value-of select="title" />
  29. </a>
  30. </h3>
  31. <time><xsl:value-of select="pubDate" /></time>
  32. <p><xsl:value-of select="description" /></p>
  33. <hr />
  34. </article>
  35. </xsl:for-each>
  36. </main>
  37. </body>
  38. </html>
  39. </xsl:template>
  40. </xsl:stylesheet>