about summary refs log tree commit diff
path: root/doc/rss.xslt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/rss.xslt')
-rw-r--r--doc/rss.xslt26
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/rss.xslt b/doc/rss.xslt
new file mode 100644
index 0000000..48f9203
--- /dev/null
+++ b/doc/rss.xslt
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:rub="https://rub.parody" extension-element-prefixes="rub"
+                xmlns:content="http://purl.org/rss/1.0/modules/content/">
+  <xsl:template match="/feed">
+    <rss version="2.0">
+      <channel>
+        <title>Demo RSS feed</title>
+        <link>https://rub.parody/</link>
+        <description>Global feed</description>
+        <generator>Rub</generator>
+        <xsl:for-each select="entry">
+          <item>
+            <title><xsl:value-of select="title"/></title>
+            <description><xsl:value-of select="description"/></description>
+            <content:encoded>
+              <xsl:apply-templates select="html/body/main"/>
+            </content:encoded>
+          </item>
+        </xsl:for-each>
+      </channel>
+    </rss>
+  </xsl:template>
+
+  <xsl:template match="main"><rub:serialize/></xsl:template>
+</xsl:stylesheet>