| 3939 |
dpurdie |
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
2 |
<!-- Style RSS so that it is readable. -->
|
|
|
3 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:domain="https://ninjacoder.net/rss/" version="1.0">
|
|
|
4 |
<xsl:output method="html"/>
|
|
|
5 |
<xsl:template match="/rss/channel">
|
|
|
6 |
<xsl:variable name="description" select="description"/>
|
|
|
7 |
<html>
|
|
|
8 |
<head>
|
|
|
9 |
<title>RSS Feed</title>
|
|
|
10 |
<script type="text/javascript">
|
|
|
11 |
// Fix for browsers that don't support disable-output-escaping
|
|
|
12 |
|
|
|
13 |
function decode_xml_doey_fix() {
|
|
|
14 |
if (!document.getElementById || !document.getElementsByName) // Needed bits of DOM present?
|
|
|
15 |
return;
|
|
|
16 |
var testDiv = document.getElementById("doey_test");
|
|
|
17 |
if (!testDiv || !('textContent' in testDiv)) // Test value on the page?
|
|
|
18 |
return;
|
|
|
19 |
var testText = testDiv.textContent;
|
|
|
20 |
if (!testText || testText == '' || testText == '\x26') // Is decoding needed?
|
|
|
21 |
return;
|
|
|
22 |
var decodeElems = document.getElementsByName('doey_decode');
|
|
|
23 |
if (!decodeElems || decodeElems.length == 0 || !("innerHTML" in decodeElems[0]) || !("textContent" in decodeElems[0]))
|
|
|
24 |
return;
|
|
|
25 |
for (var i = decodeElems.length - 1; i >= 0; i--)
|
|
|
26 |
decodeElems[i].innerHTML = decodeElems[i].textContent;
|
|
|
27 |
}
|
|
|
28 |
</script>
|
|
|
29 |
<link rel="alternate" type="application/rss+xml" title="{title}" href="{link}" />
|
|
|
30 |
<style type="text/css">
|
|
|
31 |
body { margin: 2.5em; font-family: Segoe UI, Arial, sans-serif; font-size: 80%; line-height: 1.45em; }
|
|
|
32 |
table { font-size: 100%; }
|
|
|
33 |
.indent { margin-left: 1.25em; }
|
|
|
34 |
.heading { font-family: Cambria, Georgia, serif; font-weight: bold; color: #000099; font-size: 180%; padding-top: 0.25em; margin-top: 2em; border-top: solid 3px #ccccee; }
|
|
|
35 |
.title { font-family: Cambria, Georgia, serif; font-weight: bold; color: darkred; font-size: 160%; padding-top: 0.25em; margin-top: 2em; border-top: solid 3px #ccccee; }
|
|
|
36 |
|
|
|
37 |
</style>
|
|
|
38 |
</head>
|
|
|
39 |
<body onload="decode_xml_doey_fix();">
|
|
|
40 |
<div id="doey_test" style="display: none"><xsl:text disable-output-escaping="yes">&amp;</xsl:text></div>
|
|
|
41 |
<p class="heading">RSS Information</p>
|
|
|
42 |
<p class="indent">
|
|
|
43 |
You are viewing the RSS feed for: <strong name="doey_decode"><xsl:value-of select="title" disable-output-escaping="yes"/></strong>. <br />
|
|
|
44 |
<strong>Subscribe your news reader to <a href="{link}"><xsl:value-of select="link"/></a> </strong>
|
|
|
45 |
<br /><br />
|
|
|
46 |
WikiAsp RSS 2.0 generator by Elrey Ronald Vel.
|
|
|
47 |
</p>
|
|
|
48 |
<p class="heading">Feed Description</p>
|
|
|
49 |
<p class="indent" name="doey_decode"><xsl:value-of select="description" disable-output-escaping="yes"/></p>
|
|
|
50 |
<p class="heading">Feed Items</p>
|
|
|
51 |
<xsl:choose>
|
|
|
52 |
<xsl:when test="item"><xsl:apply-templates select="item"/></xsl:when>
|
|
|
53 |
<xsl:otherwise><div class="indent">There are no entries in this RSS feed yet.</div></xsl:otherwise>
|
|
|
54 |
</xsl:choose>
|
|
|
55 |
</body>
|
|
|
56 |
</html>
|
|
|
57 |
</xsl:template>
|
|
|
58 |
<xsl:template match="item">
|
|
|
59 |
<div class="indent" style="margin-bottom: 2em;">
|
|
|
60 |
<hr style="color: silver;background-color: silver;height: 9px;" />
|
|
|
61 |
<p>
|
|
|
62 |
<table cellpadding="0" cellspacing="0" border="0">
|
|
|
63 |
<tr>
|
|
|
64 |
<td><strong>Title: </strong></td>
|
|
|
65 |
<td width="10px"></td>
|
|
|
66 |
<td><a class="title" href="{link}" name="doey_decode"><xsl:value-of select="title" disable-output-escaping="yes"/></a></td>
|
|
|
67 |
</tr>
|
|
|
68 |
<tr>
|
|
|
69 |
<td><strong>Author: </strong></td>
|
|
|
70 |
<td width="10px"></td>
|
|
|
71 |
<td><span name="doey_decode"><xsl:value-of select="author"/></span></td>
|
|
|
72 |
</tr>
|
|
|
73 |
<tr>
|
|
|
74 |
<td><strong>Date: </strong></td>
|
|
|
75 |
<td width="10px"></td>
|
|
|
76 |
<td><xsl:value-of select="pubDate"/></td>
|
|
|
77 |
</tr>
|
|
|
78 |
</table>
|
|
|
79 |
</p>
|
|
|
80 |
<div class="indent" name="doey_decode"><xsl:value-of select="description" disable-output-escaping="yes"/></div>
|
|
|
81 |
</div>
|
|
|
82 |
</xsl:template>
|
|
|
83 |
<xsl:template match="category">
|
|
|
84 |
<xsl:value-of select="."/> |
|
|
|
85 |
</xsl:template>
|
|
|
86 |
</xsl:stylesheet>
|