2007-12-19 15:30:00 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<xsl:stylesheet version="1.0"
|
2008-02-14 22:23:25 +00:00
|
|
|
xmlns="http://purl.org/rss/1.0/"
|
|
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
|
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
|
|
xmlns:cc="http://web.resource.org/cc/"
|
|
|
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
2007-12-19 15:30:00 +00:00
|
|
|
>
|
|
|
|
|
|
|
|
<xsl:output
|
2008-02-14 22:23:25 +00:00
|
|
|
encoding="utf8"
|
|
|
|
indent="yes"
|
|
|
|
method="xml"
|
2008-03-09 20:03:44 +00:00
|
|
|
media-type="application/rss+xml"
|
2008-02-14 22:23:25 +00:00
|
|
|
omit-xml-declaration="no"
|
2007-12-19 15:30:00 +00:00
|
|
|
/>
|
|
|
|
|
2008-04-27 16:53:38 +00:00
|
|
|
<xsl:variable name="lang">
|
2008-02-14 22:23:25 +00:00
|
|
|
<xsl:choose>
|
2008-04-27 16:53:38 +00:00
|
|
|
<xsl:when test="document(concat('../lang/', //@lang, '.xml'))">
|
|
|
|
<xsl:value-of select="//@lang" />
|
2008-02-14 22:23:25 +00:00
|
|
|
</xsl:when>
|
2008-04-27 16:53:38 +00:00
|
|
|
<xsl:otherwise>en</xsl:otherwise>
|
2008-02-14 22:23:25 +00:00
|
|
|
</xsl:choose>
|
2007-12-19 15:30:00 +00:00
|
|
|
</xsl:variable>
|
|
|
|
|
2008-04-17 16:02:43 +00:00
|
|
|
<xsl:variable name="site_strings" select="document('../config/frontend.xml')//strings/string" />
|
2008-04-27 16:53:38 +00:00
|
|
|
<xsl:variable name="lang_strings" select="document(concat('../lang/', $lang, '.xml'))//strings/string" />
|
2007-12-19 15:30:00 +00:00
|
|
|
|
|
|
|
<xsl:template match="/">
|
2008-02-14 22:23:25 +00:00
|
|
|
<xsl:apply-templates />
|
2007-12-19 15:30:00 +00:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="results">
|
|
|
|
|
2008-02-14 22:23:25 +00:00
|
|
|
<rdf:RDF>
|
2007-12-19 15:30:00 +00:00
|
|
|
|
2008-02-14 22:23:25 +00:00
|
|
|
<channel>
|
|
|
|
<xsl:attribute name="rdf:about">
|
|
|
|
<xsl:value-of select="$site_strings[@id='path_root']" />
|
|
|
|
<xsl:value-of select="$site_strings[@id='path_results']" />
|
|
|
|
<xsl:value-of select="//results/@query" />&xslt=rss
|
|
|
|
</xsl:attribute>
|
|
|
|
<title>
|
|
|
|
<xsl:value-of select="$site_strings[@id='site_name']" />
|
2008-04-27 16:53:38 +00:00
|
|
|
<xsl:value-of select="$lang_strings[@id='rss_separator']" />
|
2008-02-14 22:23:25 +00:00
|
|
|
<xsl:value-of select="//results/@query" />
|
|
|
|
</title>
|
|
|
|
<link>
|
|
|
|
<xsl:value-of select="$site_strings[@id='path_root']" />
|
|
|
|
<xsl:value-of select="$site_strings[@id='path_results']" />
|
|
|
|
<xsl:value-of select="//results/@query" />&
|
|
|
|
</link>
|
|
|
|
<description>
|
2008-04-27 16:53:38 +00:00
|
|
|
<xsl:value-of select="$lang_strings[@id='rss_description_1']" />
|
2008-02-14 22:23:25 +00:00
|
|
|
<xsl:value-of select="//results/@query" />
|
2008-04-27 16:53:38 +00:00
|
|
|
<xsl:value-of select="$lang_strings[@id='rss_description_2']" />
|
2008-02-14 22:23:25 +00:00
|
|
|
</description>
|
|
|
|
</channel>
|
2007-12-19 15:30:00 +00:00
|
|
|
|
2008-02-14 22:23:25 +00:00
|
|
|
<xsl:for-each select="result">
|
|
|
|
<item>
|
|
|
|
<title>
|
|
|
|
<xsl:value-of select="rdf:RDF/cc:Work/dc:title" />
|
|
|
|
</title>
|
|
|
|
<description>
|
|
|
|
<xsl:value-of select="rdf:RDF/cc:Work/dc:description" />
|
|
|
|
</description>
|
|
|
|
<link>
|
|
|
|
<xsl:value-of select="rdf:RDF/cc:Work/@rdf:about" />
|
|
|
|
</link>
|
|
|
|
</item>
|
|
|
|
</xsl:for-each>
|
2007-12-19 15:30:00 +00:00
|
|
|
|
2008-02-14 22:23:25 +00:00
|
|
|
</rdf:RDF>
|
2007-12-19 15:30:00 +00:00
|
|
|
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
|
|
</xsl:stylesheet>
|