From 2c3acd9344b61f6c187742ada34fbee760a95bc7 Mon Sep 17 00:00:00 2001 From: erlehmann Date: Wed, 19 Dec 2007 15:30:00 +0000 Subject: [PATCH] XSL null output, basic RSS feed git-svn-id: http://yolanda.mister-muffin.de/svn@211 7eef14d0-6ed0-489d-bf55-20463b2d70db --- trunk/locale/en-us.xml | 5 +++ trunk/site/main.xml | 41 ++++++++++----------- trunk/style/default.css | 4 +-- trunk/xsl/null.xsl | 24 +++++++++++++ trunk/xsl/rss.xsl | 80 +++++++++++++++++++++++++++++++++++++++++ trunk/xsl/xhtml.xsl | 59 +++++++++++++++++++----------- trunk/xsl/xspf.xsl | 8 ++--- 7 files changed, 173 insertions(+), 48 deletions(-) create mode 100644 trunk/xsl/null.xsl create mode 100644 trunk/xsl/rss.xsl diff --git a/trunk/locale/en-us.xml b/trunk/locale/en-us.xml index 75bb838..2e5e4ec 100755 --- a/trunk/locale/en-us.xml +++ b/trunk/locale/en-us.xml @@ -185,6 +185,11 @@ pagesize cortado + +  -  + This is an Yolanda RSS Feed for query " + ". + diff --git a/trunk/site/main.xml b/trunk/site/main.xml index ca6243a..9a171ee 100755 --- a/trunk/site/main.xml +++ b/trunk/site/main.xml @@ -4,28 +4,29 @@ - Yolanda - WebTV free as in Speech + Yolanda + WebTV free as in Speech - /account.pl - /account.pl?show=settings - /account.pl?show=uploads - /account.pl?show=bookmarks - /login.pl - /login.pl?action=openid - /login.pl?action=logout - http://yolanda.mister-muffin.de/trac - http://www.fsf.org/licensing/licenses/agpl-3.0.html - http://yolanda.mister-muffin.de/trac/browser/trunk - /register.pl - http://yolanda.mister-muffin.de/trac/newticket - search.pl?query= - /upload.pl - uploader.pl - search.pl?query=&orderby=timestamp&sort=desc - search.pl?query=&orderby=downloadcount&sort=desc - search.pl?query=&orderby=viewcount&sort=desc + /account.pl + /account.pl?show=settings + /account.pl?show=uploads + /account.pl?show=bookmarks + /login.pl + /login.pl?action=openid + /login.pl?action=logout + http://yolanda.mister-muffin.de/trac + http://www.fsf.org/licensing/licenses/agpl-3.0.html + http://yolanda.mister-muffin.de/trac/browser/trunk + /register.pl + http://yolanda.mister-muffin.de/trac/newticket + search.pl?query= + http://localhost/ + /upload.pl + uploader.pl + search.pl?query=&orderby=timestamp&sort=desc + search.pl?query=&orderby=downloadcount&sort=desc + search.pl?query=&orderby=viewcount&sort=desc diff --git a/trunk/style/default.css b/trunk/style/default.css index 41d06b8..3201af1 100755 --- a/trunk/style/default.css +++ b/trunk/style/default.css @@ -23,8 +23,8 @@ a a.tag { display: inline-block; - margin: 0.25em; - padding: 0em; + margin-left: 0.25em; + margin-right: 0.25em; } body diff --git a/trunk/xsl/null.xsl b/trunk/xsl/null.xsl new file mode 100644 index 0000000..af20837 --- /dev/null +++ b/trunk/xsl/null.xsl @@ -0,0 +1,24 @@ + + + + + + + + + + + + diff --git a/trunk/xsl/rss.xsl b/trunk/xsl/rss.xsl new file mode 100644 index 0000000..bed8159 --- /dev/null +++ b/trunk/xsl/rss.xsl @@ -0,0 +1,80 @@ + + + + + + + + + + + en-us + + + + + + + + + + + + + + + + + + + &xslt=rss + + + <xsl:value-of select="$site_strings[@id='site_name']" /> + <xsl:value-of select="$locale_strings[@id='rss_separator']" /> + <xsl:value-of select="//results/@value" /> + + + + + & + + + + + + + + + + + + <xsl:value-of select="rdf:RDF/cc:Work/dc:title" /> + + + + + + + + + + + + + + + + diff --git a/trunk/xsl/xhtml.xsl b/trunk/xsl/xhtml.xsl index 0d101c7..ffb48ab 100755 --- a/trunk/xsl/xhtml.xsl +++ b/trunk/xsl/xhtml.xsl @@ -34,7 +34,7 @@ - + @@ -53,27 +53,42 @@ - - - - - - - - - - + + + + + + + + + + - - - /style/embedded.css - - - - + + + /style/embedded.css + + + + + + + + + + + + + + + &xslt=rss + + + + <xsl:choose> @@ -89,6 +104,10 @@ "<xsl:value-of select="//resultspage/@query" />" </xsl:when> <xsl:otherwise> +<!-- + this seems to be fail + should be fixed somehow +--> <xsl:value-of select="$site_strings[@id='site_name']" /> - <xsl:value-of select="$site_strings[@id='site_motto']" /> diff --git a/trunk/xsl/xspf.xsl b/trunk/xsl/xspf.xsl index 5633d4a..247ba77 100644 --- a/trunk/xsl/xspf.xsl +++ b/trunk/xsl/xspf.xsl @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> +<?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns="http://xspf.org/ns/0/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" @@ -8,8 +8,6 @@ > <xsl:output - doctype-public="-//W3C//DTD XHTML 1.1//EN" - doctype-system="http://xspf.org/ns/0/" encoding="utf8" indent="yes" method="xml" @@ -17,9 +15,6 @@ omit-xml-declaration="no" /> -<xsl:variable name="site_strings" select="document('../site/main.xml')//strings" /> -<xsl:variable name="locale_strings" select="document(concat('../locale/', $locale, '.xml'))//strings/string" /> - <xsl:template match="/"> <xsl:apply-templates /> </xsl:template> @@ -55,4 +50,5 @@ </xsl:template> + </xsl:stylesheet>