]> err.no Git - sope/commitdiff
generate RSS from display group
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Tue, 23 Aug 2005 21:47:34 +0000 (21:47 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Tue, 23 Aug 2005 21:47:34 +0000 (21:47 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1070 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-appserver/samples/CoreDataBlog/RSS10.wo/RSS10.wod

index a3e5298f74a09a6c35d4a6d0940df58b205a5bdf..bfe1d5a57f436bc519cfb1b15a9cb788706f0f80 100644 (file)
@@ -2,8 +2,8 @@
 
 SetContentType: WOSetHeader {
   header = "content-type";
-  //value  = "application/rdf+xml";
-  value  = "text/xml";
+  value  = "application/rdf+xml";
+  // value  = "text/xml"; // for debugging
 }
 
 FeedTitle: WOString {
@@ -15,136 +15,30 @@ FeedDate: WOString {
 }
 
 
-ItemHref:        WOString { value = item.href;        }
-ItemTitle:       WOString { value = item.title;       }
-ItemDescription: WOString { value = item.description; }
-ItemDcSubject:   WOString { value = item.dcSubject;   }
-ItemDcCreator:   WOString { value = item.dcCreator;   }
-ItemDcDate:      WOString { value = item.dcDate;      }
-
-
 ResourceList: WORepetition {
-  list = (
-    { href = "http://www.mulle-kybernetik.com/weblog/archives/000681.html"; 
-      title = "'Interesting' Example Code";
-      link  = "";
-      description = "From an AudioCore code sample: static void BuildDeviceMenu(AudioDeviceList *devlist, NSPopUpButton *menu, AudioDeviceID initSel) { [menu removeAllItems]; AudioDeviceList::DeviceList &amp;#38;thelist = devlist-&gt;GetList(); int index = 0; for (AudioDeviceList::DeviceList::iterator i = thelist.begin(); i != thelist.end(); ++i, ++index) { while([menu itemWithTitle:[NSString stringWithCString: (*i).mName]] !=...";
-      dcSubject   = "";
-      dcCreator   = "Nat!";
-      dcDate      = "2005-08-04T00:55:55+00:00";
-    },
-    { href = "http://www.mulle-kybernetik.com/weblog/archives/000680.html"; 
-      title = "";
-      link  = "";
-      description = "";
-      dcSubject   = "";
-      dcCreator   = "Nat!";
-      dcDate      = "2005-08-04T00:55:55+00:00";
-    },
-    { href = "http://www.mulle-kybernetik.com/weblog/archives/000677.html"; 
-      title = "";
-      link  = "";
-      description = "";
-      dcSubject   = "";
-      dcCreator   = "Nat!";
-      dcDate      = "2005-08-04T00:55:55+00:00";
-    },
-    { href = "http://www.mulle-kybernetik.com/weblog/archives/000676.html"; 
-      title = "";
-      link  = "";
-      description = "";
-      dcSubject   = "";
-      dcCreator   = "Nat!";
-      dcDate      = "2005-08-04T00:55:55+00:00";
-    },
-    { href = "http://www.mulle-kybernetik.com/weblog/archives/000675.html"; 
-      title = "";
-      link  = "";
-      description = "";
-      dcSubject   = "";
-      dcCreator   = "Nat!";
-      dcDate      = "2005-08-04T00:55:55+00:00";
-    },
-    { href = "http://www.mulle-kybernetik.com/weblog/archives/000674.html"; 
-      title = "";
-      link  = "";
-      description = "";
-      dcSubject   = "";
-      dcCreator   = "Nat!";
-      dcDate      = "2005-08-04T00:55:55+00:00";
-    },
-    { href = "http://www.mulle-kybernetik.com/weblog/archives/000673.html"; 
-      title = "";
-      link  = "";
-      description = "";
-      dcSubject   = "";
-      dcCreator   = "Nat!";
-      dcDate      = "2005-08-04T00:55:55+00:00";
-    },
-    { href = "http://www.mulle-kybernetik.com/weblog/archives/000672.html"; 
-      title = "";
-      link  = "";
-      description = "";
-      dcSubject   = "";
-      dcCreator   = "Nat!";
-      dcDate      = "2005-08-04T00:55:55+00:00";
-    },
-    { href = "http://www.mulle-kybernetik.com/weblog/archives/000671.html"; 
-      title = "";
-      link  = "";
-      description = "";
-      dcSubject   = "";
-      dcCreator   = "Nat!";
-      dcDate      = "2005-08-04T00:55:55+00:00";
-    },
-    { href = "http://www.mulle-kybernetik.com/weblog/archives/000669.html"; 
-      title = "";
-      link  = "";
-      description = "";
-      dcSubject   = "";
-      dcCreator   = "Nat!";
-      dcDate      = "2005-08-04T00:55:55+00:00";
-    },
-    { href = "http://www.mulle-kybernetik.com/weblog/archives/000668.html"; 
-      title = "";
-      link  = "";
-      description = "";
-      dcSubject   = "";
-      dcCreator   = "Nat!";
-      dcDate      = "2005-08-04T00:55:55+00:00";
-    },
-    { href = "http://www.mulle-kybernetik.com/weblog/archives/000667.html"; 
-      title = "";
-      link  = "";
-      description = "";
-      dcSubject   = "";
-      dcCreator   = "Nat!";
-      dcDate      = "2005-08-04T00:55:55+00:00";
-    },
-    { href = "http://www.mulle-kybernetik.com/weblog/archives/000664.html"; 
-      title = "";
-      link  = "";
-      description = "";
-      dcSubject   = "";
-      dcCreator   = "Nat!";
-      dcDate      = "2005-08-04T00:55:55+00:00";
-    },
-    { href = "http://www.mulle-kybernetik.com/weblog/archives/000663.html"; 
-      title = "";
-      link  = "";
-      description = "";
-      dcSubject   = "";
-      dcCreator   = "Nat!";
-      dcDate      = "2005-08-04T00:55:55+00:00";
-    },
-    { href = "http://www.mulle-kybernetik.com/weblog/archives/000660.html";
-      title = "";
-      link  = "";
-      description = "";
-      dcSubject   = "";
-      dcCreator   = "Nat!";
-      dcDate      = "2005-08-04T00:55:55+00:00";
-    }
-  );
+  list = recentPostsDisplayGroup.displayedObjects;
   item = item;
 }
+
+
+// TODO: how to get an ID?
+ItemHref: WOString { value = "TODO"; }
+
+ItemTitle: WOString {
+  value      = item.title.stringByEscapingXMLString;
+  escapeHTML = NO;
+}
+ItemDescription: WOString { // TODO: shorten? (and _then_ escape)
+  value = item.body.stringByEscapingXMLString;
+}
+
+ItemDcSubject:   WOString { value = "";               } // TODO: check spec
+ItemDcCreator: WOString {
+  value = item.author.name.stringByEscapingXMLString;
+  escapeHTML = NO;
+}
+
+ItemDcDate: WOString {
+  value      = item.creationDate;
+  dateformat = "%Y-%m-%dT%H:%M:%S+00:00";
+}