-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrss-style.xsl
More file actions
46 lines (46 loc) · 1.17 KB
/
rss-style.xsl
File metadata and controls
46 lines (46 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="1.0" encoding="utf-8" indent="yes"/>
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
<xsl:value-of select="/rss/channel/title"/>
</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="/rss.css"/>
</head>
<body>
<header>
<h1>
<xsl:value-of select="/rss/channel/title"/>
</h1>
<p>
<xsl:value-of select="/rss/channel/description"/>
</p>
</header>
<main>
<xsl:for-each select="/rss/channel/item">
<article>
<h3>
<a>
<xsl:attribute name="href">
<xsl:value-of select="link"/>
</xsl:attribute>
<xsl:value-of select="title"/>
</a>
</h3>
<p>
<xsl:value-of select="description"/>
</p>
<p>
<xsl:value-of select="pubDate"/>
</p>
</article>
</xsl:for-each>
</main>
</body>
</html>
</xsl:template>
</xsl:stylesheet>