2004-01-27 22:46:13 -05:00
|
|
|
# Experimental
|
|
|
|
|
|
|
|
require "rss/1.0"
|
|
|
|
|
|
|
|
module RSS
|
|
|
|
|
2004-10-16 00:51:15 -04:00
|
|
|
TAXO_PREFIX = "taxo"
|
|
|
|
TAXO_NS = "http://purl.org/rss/1.0/modules/taxonomy/"
|
2004-01-27 22:46:13 -05:00
|
|
|
|
2004-10-16 00:51:15 -04:00
|
|
|
Element.install_ns(TAXO_PREFIX, TAXO_NS)
|
2004-01-27 22:46:13 -05:00
|
|
|
|
2004-10-16 00:51:15 -04:00
|
|
|
TAXO_ELEMENTS = []
|
2004-01-27 22:46:13 -05:00
|
|
|
|
2005-04-05 03:03:43 -04:00
|
|
|
%w(link).each do |name|
|
|
|
|
full_name = "#{TAXO_PREFIX}_#{name}"
|
|
|
|
BaseListener.install_get_text_element(TAXO_NS, name, "#{full_name}=")
|
|
|
|
TAXO_ELEMENTS << "#{TAXO_PREFIX}_#{name}"
|
2004-10-16 00:51:15 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
module TaxonomyModel
|
|
|
|
attr_writer(*%w(title description creator subject publisher
|
|
|
|
contributor date format identifier source
|
2005-04-05 03:03:43 -04:00
|
|
|
language relation coverage rights
|
|
|
|
).collect{|name| "#{TAXO_PREFIX}_#{name}"})
|
2004-10-16 00:51:15 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
class Channel; extend TaxonomyModel; end
|
|
|
|
class Item; extend TaxonomyModel; end
|
|
|
|
class Image; extend TaxonomyModel; end
|
|
|
|
class TextInput; extend TaxonomyModel; end
|
|
|
|
|
2004-01-27 22:46:13 -05:00
|
|
|
end
|