[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OCS question



I am building a basic headline grabber for our site (sort of an extranet).
Very basic, just a list of pre-determined channels. User selects a channel
(right now just a Moreover channel like "Technology Features" but can/will
expand later) and the headline viewer page loads up the remote channel file
and displays the headlines. If demand increases I can write a script to
aggregate the channels every hour or so, but right now it's not an issue.

I decided to store the list of channels in OCS format. This list contains
only external channels we selected. I'm going to push ahead with my current
workaround, but it seems the problem I have could be a lot more relevant to
others with larger implementations.

My question is: Is it acceptable to break the channel list down into
categories, and if so how?

Right now I'm doing something like this:

	<rdf:description
about="http://www.moreover.com/cgi-local/page?c=Aerospace%20and%20defense%20
industry%20news&amp;o=portal">
	  <dc:title>Aerospace and Defense Industry</dc:title>
	  <dc:identifier>aerodef</dc:identifier>
	  <dc:subject>Top Stories</dc:subject>
	  <dc:creator>Moreover</dc:creator>
	  <rdf:description
about="http://p.moreover.com/cgi-local/page?c=Aerospace%20and%20defense%20in
dustry%20news&amp;o=rss">
	    <ocs:format>http://backend.userland.com/rss091</ocs:format>
	</rdf:description>

Where <dc:identifier> is a unique ID I assign to each channel (so it can be
easily extracted from the RDF file via XPath) and <dc:subject> is simply the
category in which I feel the feed best belongs. So far I'm just using two
category names ("Top Stories" and "Technology") derived from the Moreover
categories. This allows me to filter on the subject and extract only the
feeds that belong to a particular category.

This is a very small project I'm doing on the side here, but it seems to me
this is something missing from the OCS spec. There is no <ocs:category> tag.
Should there be?

Under my current method I'd have to parse each channel definition to see if
it fits the requested category. This isn't a problem for me since this is a
small feature (for now anyway) but it seems that larger sites (NewsIsFree
etc) would have to find another solution.  By allowing categorization within
the OCS you could simply read until you found the category you want and
discard the rest (in SAX anyway -- I use DOM but my app is small enough).

Is it acceptable (or even valid) to nest the <rdf:description> elements to
create categories? e.g. would the following be acceptable?

(I'm not well-versed enough in RDF to know how to approach this, but you
should get the idea)

	<rdf:description about="(NOT SURE WHAT TO PUT HERE)">
	    <rdf:description
about="http://www.moreover.com/cgi-local/page?c=Aerospace%20and%20defense%20
industry%20news&amp;o=portal">
	      <dc:title>Aerospace and Defense Industry</dc:title>
	      <dc:identifier>aerodef</dc:identifier>
	      <dc:subject>Top Stories</dc:subject>
	      <dc:creator>Moreover</dc:creator>
	      <rdf:description
about="http://p.moreover.com/cgi-local/page?c=Aerospace%20and%20defense%20in
dustry%20news&amp;o=rss">
	        <ocs:format>http://backend.userland.com/rss091</ocs:format>
	      </rdf:description>
   </rdf:description>

Seems something like this would be a better solution:

	<ocs:category name="Top Stories">
	    <rdf:description
about="http://www.moreover.com/cgi-local/page?c=Aerospace%20and%20defense%20
industry%20news&amp;o=portal">
	      <dc:title>Aerospace and Defense Industry</dc:title>
	      <dc:identifier>aerodef</dc:identifier>
	      <dc:subject>Top Stories</dc:subject>
	      <dc:creator>Moreover</dc:creator>
	      <rdf:description
about="http://p.moreover.com/cgi-local/page?c=Aerospace%20and%20defense%20in
dustry%20news&amp;o=rss">
	        <ocs:format>http://backend.userland.com/rss091</ocs:format>
	    </rdf:description>
	</ocs:category>

Ideas?

________________________________________________________
 SSgt Dave Cantrell, USAF
 Web Developer, Logistics Information Systems
 [DSN] 596.6277  [COM] 334.416.6277
 dave.cantrell@gunter.af.mil
 https://web2.ssg.gunter.af.mil/IL  (.mil/.gov only)
--------------------------------------------------------
 If it's not useful or necessary, free yourself
 from imagining that you need to make it.
           -- http://c2.com/cgi/wiki?ShakerQuote
--------------------------------------------------------
 This e-mail does not constitute endorsement of any 
 product by the U.S. Air Force, nor can it be used to
 obligate the U.S. Air Force in any legal, financial, 
 or contractual arrangement.