""" $Id: RSS.py,v 1.5 2000/11/21 22:58:21 kmacleod Exp $ """ import Orchard RDF_NS = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" RDF_Schema_NS = "http://www.w3.org/2000/01/rdf-schema#" XMLNS_NS = "http://www.w3.org/2000/xmlns/" DublinCore_NS = "http://purl.org/dc/elements/1.1/" RSS_NS = "http://purl.org/rss/1.0/" RSS_Aggregation_NS = "http://purl.org/rss/1.0/modules/aggregation/" RSS_Annotation_NS = "http://purl.org/rss/1.0/modules/annotate/" RSS_Content_NS = "http://purl.org/rss/1.0/modules/content/" RSS_RSS091_NS = "http://purl.org/rss/1.0/modules/rss091#" RSS_Syndication_NS = "http://purl.org/rss/modules/syndication/" ChannelType = "ChannelType" class Channel(Orchard.Node): def __init__(self, *positional_args, **keyword_args): positional_args = (self,) + positional_args apply(Orchard.Node.__init__, positional_args, keyword_args) if not hasattr(self, 'items'): self.items = [] def _GET_node_type(self): return ChannelType def _GET_namespace_uri(self): return RSS_NS ImageType = "ImageType" class Image(Orchard.Node): def _GET_node_type(self): return ImageType def _GET_namespace_uri(self): return RSS_NS ItemType = "ItemType" class Item(Orchard.Node): def _GET_node_type(self): return ItemType def _GET_namespace_uri(self): return RSS_NS TextInputType = "TextInputType" class TextInput(Orchard.Node): def _GET_node_type(self): return TextInputType def _GET_namespace_uri(self): return RSS_NS def load(source): import Orchard.Parsers.RSS parser = Orchard.Parsers.RSS.RSS() return parser.parse(source)