diff options
author | dakkar <dakkar@luxion> | 2009-01-07 12:51:13 +0000 |
---|---|---|
committer | dakkar <dakkar@luxion> | 2009-01-07 12:51:13 +0000 |
commit | 8d25800c67ad65defd98771bba2331ee64104f98 (patch) | |
tree | 622f61a0c5609c61904d9da3a6ab4b8db6688a24 /t/test-site/src/common/fillFeed.xsl | |
parent | a parte i namespace sbagliati, direi che i feed possono andare bene (diff) | |
download | WebCoso-8d25800c67ad65defd98771bba2331ee64104f98.tar.gz WebCoso-8d25800c67ad65defd98771bba2331ee64104f98.tar.bz2 WebCoso-8d25800c67ad65defd98771bba2331ee64104f98.zip |
feed fatti, e pure col test
manca: testare feed intl, fare feed dei tag, mettere i tag nei feed
git-svn-id: svn://luxion/repos/WebCoso/trunk@402 fcb26f47-9200-0410-b104-b98ab5b095f3
Diffstat (limited to 't/test-site/src/common/fillFeed.xsl')
-rw-r--r-- | t/test-site/src/common/fillFeed.xsl | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/t/test-site/src/common/fillFeed.xsl b/t/test-site/src/common/fillFeed.xsl index e6077eb..04a6de3 100644 --- a/t/test-site/src/common/fillFeed.xsl +++ b/t/test-site/src/common/fillFeed.xsl @@ -1,7 +1,8 @@ <?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:f="http://webcoso.thenautilus.net/feeds" + xmlns:a="http://www.w3.org/2005/Atom" + xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="wc" version="1.0"> @@ -13,23 +14,42 @@ <x:output method="xml" encoding="utf-8" doctype-public=""/> - <x:template match="f:*"> - <x:copy> - <x:apply-templates select="@*"/> - <x:apply-templates select="*|text()"/> - </x:copy> + <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"/> + <x:apply-templates select="a:entry"/> + </a:feed> </x:template> - <x:template match="@f:*"> - <x:copy/> + <x:template match="a:entry"> + <a:entry> + <x:copy-of select="a:category"/> + <x:copy-of select="a:id"/> + <x:copy-of select="a:published"/> + <x:copy-of select="a:updated"/> + <x:apply-templates select="a:PH"/> + </a:entry> </x:template> - <x:template match="f:PH"> - <f:url><x:value-of select="."/></f:url> - <f:title><x:apply-templates select="wc:title-for($language,$filename,.)/node()"/></f:title> - <f:body> + <x:template match="a:PH"> + <a:link rel="alternate" type="text/html"><x:value-of select="."/></a:link> + <a:title type="xhtml"> + <div xml:base="{.}"> + <x:apply-templates select="wc:title-for($language,$filename,.)/node()"/> + </div> + </a:title> + <a:content type="xhtml"> + <div xml:base="{.}"> <x:apply-templates select="wc:document($language,$filename,.)/document/node()"/> - </f:body> + </div> + </a:content> </x:template> </x:stylesheet>
\ No newline at end of file |