Author: fuchsi
Date: 2007-10-03 06:00:52 +0200 (Wed, 03 Oct 2007)
New Revision: 4131

Modified:
   trunk/htroot/yacysearch.java
   trunk/htroot/yacysearch.rss
   trunk/source/de/anomic/plasma/plasmaSwitchboard.java
Log:
more fixes to the yacysearch.rss, it's now 100% valid according to 
http://feedvalidator.org
- RFC-822 date time had to include the time instead of date only
- <opensearch:link> doesn't exist -> <atom:link>, see 
http://www.opensearch.org/Specifications/OpenSearch/1.1
- <link> elements are mandatory for <channel> and <item>

Modified: trunk/htroot/yacysearch.java
===================================================================
--- trunk/htroot/yacysearch.java        2007-10-03 00:46:30 UTC (rev 4130)
+++ trunk/htroot/yacysearch.java        2007-10-03 04:00:52 UTC (rev 4131)
@@ -381,6 +381,7 @@
             // adding some additional properties needed for the rss feed
             String hostName = (String) header.get("Host", "localhost");
             if (hostName.indexOf(":") == -1) hostName += ":" + 
serverCore.getPortNr(env.getConfig("port", "8080"));
+            prop.put("searchBaseURL", "http://"; + hostName + 
"/yacysearch.html");
             prop.put("rssYacyImageURL", "http://"; + hostName + 
"/env/grafics/yacy.gif");
         }
         

Modified: trunk/htroot/yacysearch.rss
===================================================================
--- trunk/htroot/yacysearch.rss 2007-10-03 00:46:30 UTC (rev 4130)
+++ trunk/htroot/yacysearch.rss 2007-10-03 04:00:52 UTC (rev 4131)
@@ -2,19 +2,22 @@
 <?xml-stylesheet type='text/xsl' href='/yacysearch.xsl' version='1.0'?>
 <rss version="2.0"
        xmlns:yacyTopwords="http://www.yacy.net/yacy/topwords";
-       xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/";>
+       xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/";
+       xmlns:atom="http://www.w3.org/2005/Atom";>
        <!-- YaCy P2P Web Search - Results; http://yacy.net -->
        <channel>
                <title>YaCy P2P-Search for #[former]#</title>
                <description>Search for #[former]#</description>
+               
<link>#[searchBaseURL]#?search=#[former]#&amp;resource=#[input_resource]#&amp;contentdom=#[input_contentdom]#</link>
                <image>
                        <url>#[rssYacyImageURL]#</url>
                        <title>Search for #[former]#</title>
+                       
<link>#[searchBaseURL]#?search=#[former]#&amp;resource=#[input_resource]#&amp;contentdom=#[input_contentdom]#</link>
                </image>
                
<opensearch:totalResults>#[num-results_totalcount]#</opensearch:totalResults>
                
<opensearch:startIndex>#[num-results_offset]#</opensearch:startIndex>
                
<opensearch:itemsPerPage>#[num-results_itemsPerPage]#</opensearch:itemsPerPage>
-               <opensearch:link rel="search" href="opensearchdescription.xml" 
type="application/opensearchdescription+xml"/>
+               <atom:link rel="related" href="opensearchdescription.xml" 
type="application/opensearchdescription+xml"/>
                <opensearch:Query role="request" searchTerms="#[former]#" />
                
                #{results}#

Modified: trunk/source/de/anomic/plasma/plasmaSwitchboard.java
===================================================================
--- trunk/source/de/anomic/plasma/plasmaSwitchboard.java        2007-10-03 
00:46:30 UTC (rev 4130)
+++ trunk/source/de/anomic/plasma/plasmaSwitchboard.java        2007-10-03 
04:00:52 UTC (rev 4131)
@@ -2897,7 +2897,7 @@
     }
     
     // we need locale independent RFC-822 dates at some places
-    private static SimpleDateFormat DateFormatter822 = new 
SimpleDateFormat("EEE, dd MMM yyyy", Locale.US);
+    private static SimpleDateFormat DateFormatter822 = new 
SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z", Locale.US);
     public static String dateString822(Date date) {
         if (date == null) return ""; else return DateFormatter822.format(date);
     }

_______________________________________________
YaCy-svn mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/yacy-svn

Antwort per Email an