<?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"
exclude-result-prefixes="wc a"
version="1.0">
<x:import href="du2html.xsl"/>
<x:param name="language" select="'en'"/>
<x:param name="path"/>
<x:param name="filename"/>
<x:output method="xml" encoding="utf-8" doctype-public=""/>
<x:template match="a:feed">
<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"/>
</feed>
</x:template>
<x:template match="a:entry">
<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"/>
</entry>
</x:template>
<x:template match="a:PH">
<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>
</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>
</content>
<x:for-each select="wc:document($language,$filename,.)/document/docinfo/field[field_name='tags']/field_body">
<x:for-each select="*/list_item|paragraph">
<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>
</x:stylesheet>