### Eclipse Workspace Patch 1.0
#P django-trunk
Index: django/utils/feedgenerator.py
===================================================================
--- django/utils/feedgenerator.py	(revision 13426)
+++ django/utils/feedgenerator.py	(working copy)
@@ -71,13 +71,15 @@
     "Base class for all syndication feeds. Subclasses should provide write()"
     def __init__(self, title, link, description, language=None, author_email=None,
             author_name=None, author_link=None, subtitle=None, categories=None,
-            feed_url=None, feed_copyright=None, feed_guid=None, ttl=None, **kwargs):
+            feed_url=None, feed_copyright=None, feed_guid=None, ttl=None, stylesheets=None, **kwargs):
         to_unicode = lambda s: force_unicode(s, strings_only=True)
         if categories:
             categories = [force_unicode(c) for c in categories]
         if ttl is not None:
             # Force ints to unicode
             ttl = force_unicode(ttl)
+        if stylesheets:
+            stylesheets = [iri_to_uri(s) for s in stylesheets]
         self.feed = {
             'title': to_unicode(title),
             'link': iri_to_uri(link),
@@ -92,6 +94,7 @@
             'feed_copyright': to_unicode(feed_copyright),
             'id': feed_guid or link,
             'ttl': ttl,
+            'stylesheets': stylesheets or (),
         }
         self.feed.update(kwargs)
         self.items = []
@@ -198,6 +201,8 @@
     def write(self, outfile, encoding):
         handler = SimplerXMLGenerator(outfile, encoding)
         handler.startDocument()
+        for s in self.feed['stylesheets']:
+            handler.processingInstruction('xml-stylesheet', 'type="text/css" href="%s"' % s) # http://www.w3.org/TR/xml-stylesheet/
         handler.startElement(u"rss", self.rss_attributes())
         handler.startElement(u"channel", self.root_attributes())
         self.add_root_elements(handler)
Index: django/contrib/syndication/views.py
===================================================================
--- django/contrib/syndication/views.py	(revision 13426)
+++ django/contrib/syndication/views.py	(working copy)
@@ -114,6 +114,7 @@
             feed_copyright = self.__get_dynamic_attr('feed_copyright', obj),
             feed_guid = self.__get_dynamic_attr('feed_guid', obj),
             ttl = self.__get_dynamic_attr('ttl', obj),
+            stylesheets = self.__get_dynamic_attr('stylesheets', obj),
             **self.feed_extra_kwargs(obj)
         )
 
