General Actions:
Log-in
Register
Wiki:
Main wiki
▼
:
Document Index
»
Space:
XWiki
▼
:
Document Index
»
Page:
BlogRssCode
Search
en
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
BlogRssCode
Wiki source code of
BlogRssCode
Last modified by
Administrator
on 2010/09/23 14:50
Content
·
Comments
(0)
·
Annotations
(0)
·
Attachments
(0)
·
History
·
Information
Show line numbers
{pre} $context.setCacheDuration(1800) #set($cal = $xwiki.calendar.calendar) #set($ok = $cal.add(10, 1)) #set($ok = $response.setDateHeader("Expires", $cal.time.time)) <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wiki="http://purl.org/rss/1.0/modules/wiki/" xmlns:html="http://www.w3.org/1999/xhtml"> <channel rdf:about="$baseurl"> <title> #if($title) $title #else $request.serverName #end </title> <link>$baseurl</link> <description> #if($description) $description #else $request.serverName #end </description> #set($logourl = $xwiki.getSkinFile($xwiki.getSkinPreference('logo', 'logo.png'))) #set($port = "") #if(($request.scheme == "http") && ($request.serverPort != 80)) #set($port = ":${request.serverPort}") #elseif(($request.scheme == "https") && ($request.serverPort != 443)) #set($port = ":${request.serverPort}") #end #set($logourl = "${request.scheme}://${request.serverName}${port}$logourl") <image rdf:resource="$logourl"/> <dc:language>$doc.defaultLanguage</dc:language> <dc:rights>$xwiki.getXMLEncoded($xwiki.webCopyright.replaceAll('<', '<html:').replaceall('<html:/', '</html:'))</dc:rights> <dc:publisher>$xwiki.getUserName($doc.author, false)</dc:publisher> <dc:creator>$xwiki.getUserName($doc.author, false)</dc:creator> <items> <rdf:Seq> #if(!$list) #if(!$sql) #if($request.category) #set($category = $request.category) #end #if((!$category)||($category=="")) #set($sql = ", BaseObject as obj where obj.name=doc.fullName and obj.className='XWiki.ArticleClass' and obj.name<>'XWiki.ArticleClassTemplate' order by doc.creationDate desc") #else #set($sql = ", BaseObject as obj, DBStringListProperty as prop join prop.list list where obj.name=doc.fullName and obj.className='XWiki.ArticleClass' and obj.name<>'XWiki.ArticleClassTemplate' and obj.id=prop.id.id and prop.id.name='category' and list = '$category' order by doc.creationDate desc") #end #end #set($list = $xwiki.searchDocuments($sql, 20, 0)) #end #set($list = $xwiki.wrapDocs($list)) #foreach ($currentdoc in $list) #if($xwiki.hasAccessLevel("view", "${context.database}:${currentdoc.fullName}")) <rdf:li rdf:resource="$currentdoc.getExternalURL('view', "language=${currentdoc.realLanguage}")" /> #end #end </rdf:Seq> </items> </channel> <image rdf:about="$logourl"> <title>XWiki Logo</title> <link>${baseurl}</link> <url>$logourl</url> </image> #foreach ($currentdoc in $list) #if($xwiki.hasAccessLevel("view", "${context.database}:${currentdoc.fullName}")) #set ($url = $currentdoc.getExternalURL('view', "language=${currentdoc.realLanguage}")) #set($currentobj = $currentdoc.getObject("XWiki.ArticleClass")) #set($content = "") #set($content = $currentdoc.extract) #if($content=="") #set($content = $currentdoc.display("content", "view", $currentobj)) #if($content.length()>=400) #set($i = $content.indexOf(" ", 400)) #set($i = $i + 1) #set($content = "${content.substring(0, $i)}") #set($content = $content.concat('<a href="${url}">...</a>')) #end #end #set($desc = $xwiki.getXMLEncoded($doc.getRenderedContent($content))) <item rdf:about="$url"> <title>$xwiki.getXMLEncoded($currentdoc.display("title", "view", $currentobj))</title> <link>$url</link> <description>$desc</description> <dc:subject>$xwiki.getXMLEncoded($currentdoc.display("category", "view", $currentobj))</dc:subject> #set($tz = $xwiki.formatDate($currentdoc.date, "Z")) #set($tz = "${tz.substring(0, 3)}:${tz.substring(3)}") <dc:date>$xwiki.formatDate($currentdoc.date, "yyyy-MM-dd")T$xwiki.formatDate($currentdoc.date, "hh:mm:ss")$tz</dc:date> <dc:creator>$xwiki.getXMLEncoded($xwiki.getUserName($currentdoc.creator, false))</dc:creator> <dc:contributor> <rdf:Description link=""> <rdf:value>$xwiki.getXMLEncoded($xwiki.getUserName($currentdoc.author, false))</rdf:value> </rdf:Description> </dc:contributor> </item> #end #end </rdf:RDF> {/pre}