2020-03-20 14:32:44 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
|
|
|
|
|
|
<xsl:output method="html"/>
|
|
|
|
|
|
|
|
<xsl:template match="/">
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>RSS feed by morss</title>
|
|
|
|
|
|
|
|
<style type="text/css">
|
|
|
|
body > pre {
|
|
|
|
background-color: #FFFAF4;
|
|
|
|
padding: 1%;
|
|
|
|
overflow-x: scroll;
|
|
|
|
max-width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
ul {
|
|
|
|
list-style-type: none;
|
|
|
|
}
|
|
|
|
|
2020-03-20 15:44:49 +00:00
|
|
|
.tag {
|
2020-03-20 14:32:44 +00:00
|
|
|
color: darkred;
|
|
|
|
}
|
|
|
|
|
2020-03-20 15:44:49 +00:00
|
|
|
.attr {
|
|
|
|
color: darksalmon;
|
|
|
|
}
|
|
|
|
|
|
|
|
.value {
|
|
|
|
color: darkblue;
|
|
|
|
}
|
|
|
|
|
2020-03-20 14:32:44 +00:00
|
|
|
.comment {
|
|
|
|
color: lightgrey;
|
|
|
|
}
|
|
|
|
|
|
|
|
pre {
|
|
|
|
margin: 0;
|
2020-03-20 14:44:25 +00:00
|
|
|
max-width: 100%;
|
|
|
|
white-space: normal;
|
|
|
|
overflow-wrap: anywhere;
|
|
|
|
word-wrap: anywhere;
|
2020-03-20 14:32:44 +00:00
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<h1>RSS feed by morss</h1>
|
|
|
|
|
|
|
|
<p>Your RSS feed is <strong style="color: green">ready</strong>. You
|
2020-03-20 18:46:20 +00:00
|
|
|
can enter the following url in your newsreader:</p>
|
|
|
|
|
|
|
|
<div id="url"></div>
|
2020-03-20 14:32:44 +00:00
|
|
|
|
|
|
|
<ul>
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</ul>
|
|
|
|
|
2020-03-20 18:46:20 +00:00
|
|
|
<script>
|
|
|
|
document.getElementById("url").innerHTML = window.location.href;
|
|
|
|
</script>
|
2020-03-20 14:32:44 +00:00
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="*">
|
|
|
|
<li>
|
|
|
|
<span class="element">
|
2020-03-20 15:44:49 +00:00
|
|
|
<
|
|
|
|
<span class="tag"><xsl:value-of select="name()"/></span>
|
|
|
|
|
|
|
|
<xsl:for-each select="@*">
|
|
|
|
<span class="attr"> <xsl:value-of select="name()"/></span>
|
|
|
|
=
|
|
|
|
"<span class="value"><xsl:value-of select="."/></span>"
|
|
|
|
</xsl:for-each>
|
|
|
|
>
|
2020-03-20 14:32:44 +00:00
|
|
|
</span>
|
2020-03-20 15:44:49 +00:00
|
|
|
|
2020-03-20 14:32:44 +00:00
|
|
|
<xsl:if test="node()">
|
|
|
|
<ul>
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</ul>
|
|
|
|
</xsl:if>
|
2020-03-20 15:44:49 +00:00
|
|
|
|
2020-03-20 14:32:44 +00:00
|
|
|
<span class="element">
|
2020-03-20 15:44:49 +00:00
|
|
|
</
|
|
|
|
<span class="tag"><xsl:value-of select="name()"/></span>
|
|
|
|
>
|
2020-03-20 14:32:44 +00:00
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="comment()">
|
|
|
|
<li>
|
|
|
|
<pre class="comment"><![CDATA[<!--]]><xsl:value-of select="."/><![CDATA[-->]]></pre>
|
|
|
|
</li>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="text()">
|
|
|
|
<li>
|
|
|
|
<pre>
|
2020-03-20 14:44:25 +00:00
|
|
|
<xsl:value-of select="normalize-space(.)"/>
|
2020-03-20 14:32:44 +00:00
|
|
|
</pre>
|
|
|
|
</li>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="text()[not(normalize-space())]"/>
|
|
|
|
|
|
|
|
</xsl:stylesheet>
|