From: Chris N. <pu...@po...> - 2000-12-11 16:53:38
|
At 20:09 -0800 2000.12.09, Rael Dornfest wrote: >First, I should apologise for my delayed response on this -- bad, bad >procmail! :) >On Mon, 4 Dec 2000, Chris Nandor wrote: > >> OK, here is a list of the data for stories that we have available, >> that we might want to put in to RSS 1.0 files. I listed pretty much >> all the data for stories, and just a few things for site. Comments >> welcome. > >Chris, could you provide a dump of a typical record so as to see what type >of data is in each of these fields? OK, given below with the data. >What further constraints are >there in terms of what fields are likely to / will always / will _not_ >appear together? For example, will there ever be a case when topic and >section are both appropriate? Which fields have constrained possible >values? There is always a topic and a section. >> The purpose of this is to put these items into available RSS fields, >> either in the RSS core in Dublin Core, or in our own Slash XML module. > >Aside from title, link, and description (corresponding to title, url, >introtext, I believe) nothing else goes into the core as far as items are >concerned. As for Dublin Core, there are various possible mappings you >can do; for example: topic or section or a combinaton of the two in >dc:subject, author in dc:creator, date in dc:date ... see my sample >Slashcode RSS 1.0 document example below. OK. >> >From here, we could then move on to defining fields for comments >> and users, and any other data we want to search on, for the purpose >> of returning search data to users and to any other searches we want >> to enable. > >You need to determine what's necessary/useful from the rest of the fields, >and it makes sense at least initially to put these into a slashcode module >... again, see my sample below. At some point you might find that a >more generalised module exists to house some of this, but that's not the >case right now. Fact is that widespread use of an ad-hoc module will >heavily influence any such generalised module. Yeah, we could either try to come up with a "Slash" module, or some more general module. >Ok, so first a little mapping between the fields you've provided and >the RSS core (rss), Dublin Core (dc), and Syndication (syn) modules, >and a made-up Slashcode (slash) module... > >> site >> ---- >> URL rss:channel->rss:link http://slashdot.org/ >> name rss:channel->rss:title Slashdot >> language rss:channel->dc:language en-us >> slogan (description) rss:channel->rss:description News for Nerds. Stuff that matters. >> contact email rss:channel->dc:creator so...@sl... >> stories >> ------- I'll list three stories' worth of data for examples. >> URL (story ID) rss:item->rss:link http://slashdot.org/comments.pl?sid=00/12/11/152211 http://slashdot.org/comments.pl?sid=00/12/09/2329239 http://slashdot.org/comments.pl?sid=00/12/09/1933249 >> title rss:item->rss:title New P2P tool Using... IRC? Gifts For Geeks Could Tesla's Broadcast Power System Work? >> author rss:item->dc:creator Hemos CmdrTaco Cliff >> section rss:item->dc:subject articles features askslashdot >> topic rss:item->dc:subject (either/or/combined) internet xmas news >> department rss:item->slash:department interesting-idea cheesy-alliteration-is-where-it's-at relevant-ideas-from-one-of-science's-greatest >> number of comments rss:item->slash:comments 86 184 28 >> date rss:item->dc:date 2000-12-11 15:11:51 2000-12-11 11:06:02 2000-12-10 23:01:49 >> other (probably not useful, or should not be included): As noted, I probably would not want any of the below included, but added in all the story data we have just for kicks, in case I missed something. >> introtext rss:item->rss:description >> bodytext (more content than metadata, but up to you) Technically, introtext is not necessarily metadata either. introtext is what appears on the main page, which may be the entire text of the story. >> writestatus what is this? This is a flag determining whether a new static page should be written out (the story has been changed since last time a static page has been written). >> hits rss:item->slash:hits How many hits the story has received. >> displaystatus what is this? Whether the story should be displayed on the home page, in a particular section, or not at all. >> commentstatus what is this? Whether comments can be posted. Not used. >> hitparade what is this? A list of how many comments at each "score" level. So for "86,58,37,18,5,4,2", that would mean there are 86 total comments, 58 comments with scores of 0 and up, 37 1 and up, 18 2, 5 3, 4 4, and 2 at 5 and up. This is the info you see when you are in a story and you click the Threshold popup menu. >> relatedtext sounds interesting... what is it? This is for the "Related Links" box next to a story. >> extratext sounds interesting... what is it? This is not really used. >I'm afraid I don't know what some of the above are or how useful they >would be, but they'd probably be best in a Slashcode module if deemed >useful/interesting. I don't think any of them would be too useful or interesting -- or we just would not want to give out that information -- with the _possible_ exception of hitparade. >If section and story are mutually exclusive, then have the appropriate >one be dc:subject. If they co-occur, have the most descriptive one >be dc:subject and the one more for internal use by slash:{topic/section}. Well, topic is the most descriptive. Section is more for stuff like "Ask Slashdot", where you can have separate sections on the site. Topic is what is more like Subject. >The following sample template uses ${} to indicate the fields I've slotted >in as mapped above... > ><?xml version="1.0" encoding="iso-8859-1"?> ><rdf:RDF > xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > xmlns:dc="http://purl.org/dc/elements/1.1/" > xmlns:slash="http://slashcode.net/rss/elements/1.0/" > xmlns="http://purl.org/rss/1.0/" >> > > <channel rdf:about="${site_url}"> > <title>${site_name}</title> > <link>${site_url}</link> > <description>${site_slogan}</description> > <dc:rights>Copyright 2000, ${site_name}</dc:rights> > <dc:creator>${site_contact_email}</dc:publisher> > <dc:publisher>${site_name}</dc:publisher> Actually, this would probably be "OSDN" in the case of Slashdot, since OSDN is the publisher of the site. > <dc:language>${site_language}</dc:language> > > <items> > <rdf:Seq> > <rdf:li rdf:resource="${story_url}" /> > ... > <rdf:li rdf:resource="${story_url}" /> > </rdf:Seq> > </items> So <items> lists the individual items which are then described further below? > </channel> > > <item rdf:about="${story_url}"> > <title>${story_title}</title> > <link>${story_url}</link> > <description>${story_intro_text}</description> Yeah, since in the case of Slashdot we don't want to give this text away, we would probably at most give the first $n words or something. But probably, we won't put this in at all, and just rely on section/topic/department. > <dc:creator>${story_author}</dc:creator> > <dc:subject>${story_section}: ${story_topic}</dc:subject> Perhaps: <dc:subject>${story_topic}</dc:subject> <slash:section>${story_section}</slash:section> > <dc:language>${story/site_language}</dc:language> Right now, we just have site language support. > <dc:date>${story-date}</dc:date> > <dc:format>text/html</dc:format> > <slash:department>${story_department}</slash:department> > <slash:comments>${story_number_of_comments}</slash:comments> > <slash:hits>${story_hits}</slash:hits> Yeah, we won't put hits in, that's private data. > ... > </item> > > ... > ></rdf:RDF> > >Again, a template will be much easier to refine with a sample record or >three from your database. And, of course, quite a bit of this needs >only a little artistic license. > >Hope this provides a useful start. Yes, it does. I think what you've given us helps a lot. We need XML::RSS to support 1.0 of course, but we also need to find a way to tell the RSS what each topic (subject) and section means. How does that work? Do we create some document that describes the possible sections and topics? -- Chris Nandor pu...@po... http://pudge.net/ Open Source Development Network pu...@os... http://osdn.com/ |