From: Rael D. <ra...@or...> - 2000-12-10 04:09:53
|
Howdy, 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? 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? > 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. > >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. --- 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 > name rss:channel->rss:title > language rss:channel->dc:language > slogan (description) rss:channel->rss:description > contact email rss:channel->dc:creator > stories > ------- > URL (story ID) rss:item->rss:link > title rss:item->rss:title > author rss:item->dc:creator > section rss:item->dc:subject > topic rss:item->dc:subject (either/or/combined) > department rss:item->slash:department > number of comments rss:item->slash:comments > date rss:item->dc:date > other (probably not useful, or should not be included): > introtext rss:item->rss:description > bodytext (more content than metadata, but up to you) > writestatus what is this? > hits rss:item->slash:hits > displaystatus what is this? > commentstatus what is this? > hitparade what is this? > relatedtext sounds interesting... what is it? > extratext sounds interesting... what is it? 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. 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}. --- 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> <dc:language>${site_language}</dc:language> <items> <rdf:Seq> <rdf:li rdf:resource="${story_url}" /> ... <rdf:li rdf:resource="${story_url}" /> </rdf:Seq> </items> </channel> <item rdf:about="${story_url}"> <title>${story_title}</title> <link>${story_url}</link> <description>${story_intro_text}</description> <dc:creator>${story_author}</dc:creator> <dc:subject>${story_section}: ${story_topic}</dc:subject> <dc:language>${story/site_language}</dc:language> <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> ... </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. Rael ------------------------------------------------------------------ Rael Dornfest ra...@or... Maven, http://www.oreillynet.com/~rael The O'Reilly Network http://meerkat.oreillynet.com ------------------------------------------------------------------ |