From: helge Date: Tue, 23 Aug 2005 21:47:34 +0000 (+0000) Subject: generate RSS from display group X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10218fb6fe5a1229d1380d442c13bf3209652e6e;p=sope generate RSS from display group git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1070 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-appserver/samples/CoreDataBlog/RSS10.wo/RSS10.wod b/sope-appserver/samples/CoreDataBlog/RSS10.wo/RSS10.wod index a3e5298f..bfe1d5a5 100644 --- a/sope-appserver/samples/CoreDataBlog/RSS10.wo/RSS10.wod +++ b/sope-appserver/samples/CoreDataBlog/RSS10.wo/RSS10.wod @@ -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 &thelist = devlist->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"; +}