summaryrefslogtreecommitdiff
path: root/templates/fillFeed.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/fillFeed.xsl')
-rw-r--r--templates/fillFeed.xsl51
1 files changed, 26 insertions, 25 deletions
diff --git a/templates/fillFeed.xsl b/templates/fillFeed.xsl
index 593ff51..a05e630 100644
--- a/templates/fillFeed.xsl
+++ b/templates/fillFeed.xsl
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<x:stylesheet xmlns:x="http://www.w3.org/1999/XSL/Transform"
xmlns:wc="http://webcoso.thenautilus.net/"
+ xmlns="http://www.w3.org/2005/Atom"
xmlns:a="http://www.w3.org/2005/Atom"
- xmlns="http://www.w3.org/1999/xhtml"
- exclude-result-prefixes="wc"
+ exclude-result-prefixes="wc a"
version="1.0">
<x:import href="du2html.xsl"/>
@@ -15,43 +15,44 @@
<x:output method="xml" encoding="utf-8" doctype-public=""/>
<x:template match="a:feed">
- <a:feed xml:lang="{$language}" xml:base="http://www.thenautilus.net/">
- <a:author>
- <a:name>Gianni Ceccarelli</a:name>
- <a:email>dakkar@thenautilus.net</a:email>
- </a:author>
- <a:id>http://www.thenautilus.net/</a:id>
- <a:link rel="alternate" type="text/html" href="http://www.thenautilus.net{wc:dst-uri-for($filename)}"/>
- <a:title type="text">thenautilus.net</a:title>
- <x:copy-of select="a:updated"/>
+ <feed xml:lang="{$language}" xml:base="http://www.thenautilus.net/">
+ <author>
+ <name>Gianni Ceccarelli</name>
+ <email>dakkar@thenautilus.net</email>
+ </author>
+ <id><x:value-of select="a:id"/></id>
+ <link rel="alternate" type="text/html" href="http://www.thenautilus.net{wc:dst-uri-for($filename)}"/>
+ <link rel="self" type="application/atom+xml" href="http://www.thenautilus.net{wc:dst-uri-for($filename)}feed.{$language}.xml"/>
+ <title type="text">thenautilus.net</title>
+ <updated><x:value-of select="a:updated"/></updated>
<x:apply-templates select="a:entry"/>
- </a:feed>
+ </feed>
</x:template>
<x:template match="a:entry">
- <a:entry>
- <x:copy-of select="a:id"/>
- <x:copy-of select="a:published"/>
- <x:copy-of select="a:updated"/>
+ <entry>
+ <id><x:value-of select="a:id"/></id>
+ <published><x:value-of select="a:published"/></published>
+ <updated><x:value-of select="a:updated"/></updated>
<x:apply-templates select="a:PH"/>
- </a:entry>
+ </entry>
</x:template>
<x:template match="a:PH">
- <a:link rel="alternate" type="text/html" href="{.}"/>
- <a:title type="xhtml">
- <div xml:base="{.}">
+ <link rel="alternate" type="text/html" href="{.}"/>
+ <title type="xhtml">
+ <div xml:base="{.}" xmlns="http://www.w3.org/1999/xhtml">
<x:apply-templates select="wc:title-for($language,$filename,.)/node()"/>
</div>
- </a:title>
- <a:content type="xhtml">
- <div xml:base="{.}">
+ </title>
+ <content type="xhtml">
+ <div xml:base="{.}" xmlns="http://www.w3.org/1999/xhtml">
<x:apply-templates select="wc:document($language,$filename,.)/document/node()"/>
</div>
- </a:content>
+ </content>
<x:for-each select="wc:document($language,$filename,.)/document/docinfo/field[field_name='tags']/field_body">
<x:for-each select="*/list_item|paragraph">
- <a:category term="{normalize-space(.)}" label="{normalize-space(string(wc:title-for($language,$filename,concat('/tags/',normalize-space(.),'/'))))}"/>
+ <category term="{normalize-space(.)}" label="{normalize-space(string(wc:title-for($language,$filename,concat('/tags/',normalize-space(.),'/'))))}"/>
</x:for-each>
</x:for-each>
</x:template>