### Eclipse Workspace Patch 1.0
#P platform
Index: core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/test/resources/macrorss1.test
===================================================================
--- core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/test/resources/macrorss1.test	(revision 0)
+++ core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/test/resources/macrorss1.test	(revision 0)
@@ -0,0 +1,12 @@
+.#-----------------------------------------------------
+.input|xwiki/2.0
+.#-----------------------------------------------------
+{{testrssmacro feed="http://some.feed.com"/}}
+.#-----------------------------------------------------
+.expect|xhtml/1.0
+.#-----------------------------------------------------
+<!--startmacro:testrssmacro|-|feed="http://some.feed.com"|-|--><div class="box"><p><!--startwikilink:http://liftoff.msfc.nasa.gov/--><span class="wikiexternallink"><a class="wikimodel-freestanding" href="http://liftoff.msfc.nasa.gov/">Lift Off News</a></span><!--stopwikilink--></p><div class="box"><p><!--startwikilink:http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp--><span class="wikiexternallink"><a class="wikimodel-freestanding" href="http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp">Star City</a></span><!--stopwikilink--></p><p>How do Americans get ready to work with Russians aboard the<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;International Space Station? They take a crash course in culture, language<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and protocol at Russia's Star City.</p></div><div class="box"><p><!--startwikilink:http://liftoff.msfc.nasa.gov/--><span class="wikiexternallink"><a class="wikimodel-freestanding" href="http://liftoff.msfc.nasa.gov/">Space Exploration</a></span><!--stopwikilink--></p><p>Sky watchers in Europe, Asia, and parts of Alaska and Canada<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;will experience a partial eclipse of the Sun on Saturday, May 31st.</p></div><div class="box"><p><!--startwikilink:http://liftoff.msfc.nasa.gov/news/2003/news-VASIMR.asp--><span class="wikiexternallink"><a class="wikimodel-freestanding" href="http://liftoff.msfc.nasa.gov/news/2003/news-VASIMR.asp">The Engine That Does More</a></span><!--stopwikilink--></p><p>Before man travels to Mars, NASA hopes to design new engines<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;that will let us fly through the Solar System more quickly. &nbsp;The proposed<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VASIMR engine would do that.</p></div><div class="box"><p><!--startwikilink:http://liftoff.msfc.nasa.gov/news/2003/news-laundry.asp--><span class="wikiexternallink"><a class="wikimodel-freestanding" href="http://liftoff.msfc.nasa.gov/news/2003/news-laundry.asp">Astronauts' Dirty Laundry</a></span><!--stopwikilink--></p><p>Compared to earlier spacecraft, the International Space<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Station has many luxuries, but laundry facilities are not one of them.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Instead, astronauts have other options.</p></div></div><!--stopmacro-->
+.#-----------------------------------------------------
+.expect|xwiki/2.0
+.#-----------------------------------------------------
+{{testrssmacro feed="http://some.feed.com"/}}
\ No newline at end of file
Index: core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/main/resources/META-INF/plexus/components.xml
===================================================================
--- core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/main/resources/META-INF/plexus/components.xml	(revision 0)
+++ core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/main/resources/META-INF/plexus/components.xml	(revision 0)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ *
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *
+-->
+
+<component-set>
+  <components>
+    <component>
+      <role>org.xwiki.rendering.macro.Macro</role>
+      <role-hint>rss</role-hint>
+      <implementation>org.xwiki.rendering.internal.macro.rss.RssMacro</implementation>
+      <instantiation-strategy>singleton</instantiation-strategy>
+      <requirements>
+        <requirement>
+          <role>org.xwiki.rendering.macro.Macro</role>
+          <role-hint>box</role-hint>
+          <field-name>boxMacro</field-name>
+        </requirement>
+      </requirements>
+    </component>
+  </components>
+</component-set>
Index: core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/main/java/org/xwiki/rendering/internal/macro/rss/RssMacro.java
===================================================================
--- core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/main/java/org/xwiki/rendering/internal/macro/rss/RssMacro.java	(revision 0)
+++ core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/main/java/org/xwiki/rendering/internal/macro/rss/RssMacro.java	(revision 0)
@@ -0,0 +1,298 @@
+/*
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.xwiki.rendering.internal.macro.rss;
+
+import java.util.Collections;
+import java.util.List;
+
+import com.sun.syndication.feed.rss.Channel;
+import com.sun.syndication.feed.synd.SyndEntry;
+import com.sun.syndication.feed.synd.SyndFeed;
+import com.sun.syndication.io.SyndFeedInput;
+import com.sun.syndication.io.XmlReader;
+
+import org.xwiki.rendering.block.Block;
+import org.xwiki.rendering.block.ImageBlock;
+import org.xwiki.rendering.block.LinkBlock;
+import org.xwiki.rendering.block.ParagraphBlock;
+import org.xwiki.rendering.block.XMLBlock;
+import org.xwiki.rendering.listener.Link;
+import org.xwiki.rendering.listener.LinkType;
+import org.xwiki.rendering.listener.xml.XMLElement;
+import org.xwiki.rendering.macro.AbstractMacro;
+import org.xwiki.rendering.macro.Macro;
+import org.xwiki.rendering.macro.MacroExecutionException;
+import org.xwiki.rendering.macro.box.BoxMacroParameters;
+import org.xwiki.rendering.macro.descriptor.DefaultMacroDescriptor;
+import org.xwiki.rendering.macro.rss.RssMacroParameters;
+import org.xwiki.rendering.transformation.MacroTransformationContext;
+import org.xwiki.rendering.util.ParserUtils;
+
+/**
+ * Allows rendering a RSS feed.
+ * 
+ * @version $Id: $
+ * @since 1.7
+ */
+public class RssMacro extends AbstractMacro<RssMacroParameters>
+{
+    /**
+     * The name of the HTML name attribute.
+     */
+    private static final String NAME_ATTRIBUTE = "name";
+
+    /**
+     * The name of the CSS class attribute.
+     */
+    private static final String CLASS_ATTRIBUTE = "class";
+
+    /**
+     * The HTML "input" tag.
+     */
+    private static final String INPUT = "input";
+    
+    /**
+     * The HTML "div" tag.
+     */
+    private static final String DIV = "div";
+    
+    /**
+     * The description of the macro.
+     */
+    private static final String DESCRIPTION = "Allows displaying a RSS feed.";
+
+    /**
+     * Injected by the Component Manager.
+     */
+    protected Macro<BoxMacroParameters> boxMacro;
+    
+    /** 
+     * Needed to parse the ordinary text. 
+     */
+    private ParserUtils parserUtils;
+
+    /**
+     * Create and initialize the descriptor of the macro.
+     */
+    public RssMacro()
+    {
+        super(new DefaultMacroDescriptor(DESCRIPTION, RssMacroParameters.class));
+    }
+
+    /**
+     * Used for implementing the lazy initialization of the parseUtils.
+     * @return the parseUtils needed to parse the ordinary text
+     */
+    public ParserUtils getParserUtils()
+    {
+        if (parserUtils == null) {
+            parserUtils = new ParserUtils();
+        }
+        return parserUtils;
+    }
+
+    /**
+     * Render the search field, if the feed has one.
+     * @param feed the RSS Channel we retrieved via the Feed URL
+     * @param parameters the macro's parameters
+     * @param context the required MacroTransformationContext for performing the rendering
+     * @return a Block containing the rendered XDOM subtree, or null if the feed
+     * doesn't have a search field and the <code>search</code> parameter is <code>true</code>.
+     * @throws MacroExecutionException if the search field cannot be rendered
+     */
+    private Block renderSearch(SyndFeed feed, RssMacroParameters parameters, 
+        MacroTransformationContext context) throws MacroExecutionException {
+        if (!parameters.isSearch()) {
+            return null;
+        } 
+        
+        String link = null;
+        String name = null;
+        String description = null;
+        try {
+            Channel channel = (Channel) feed.createWireFeed();
+            link = channel.getTextInput().getLink();
+            name = channel.getTextInput().getName();
+            description = channel.getTextInput().getDescription();
+        } catch (Exception e) {
+            return null;
+        }
+        
+        XMLBlock parentBlock = 
+            new XMLBlock(new XMLElement(DIV, Collections.singletonMap(CLASS_ATTRIBUTE, "rsstextinput")));
+
+        XMLBlock descriptionBlock = 
+            new XMLBlock(new XMLElement(DIV, Collections.singletonMap(CLASS_ATTRIBUTE, "rsstextinputdescription")));
+        descriptionBlock.addChildren(parserUtils.parseInlineNonWiki(description));
+        
+        XMLBlock formBlock = new XMLBlock(new XMLElement("form", 
+            Collections.singletonMap("action", link)));
+        
+        XMLBlock inputBlock = new XMLBlock(new XMLElement(INPUT, 
+            Collections.singletonMap(NAME_ATTRIBUTE, name)));
+
+        XMLBlock submitBlock = new XMLBlock(new XMLElement(INPUT, 
+            Collections.singletonMap("type", "submit")));
+        
+        formBlock.addChild(inputBlock);
+        formBlock.addChild(submitBlock);
+        parentBlock.addChild(descriptionBlock);
+        parentBlock.addChild(formBlock);
+       
+        return parentBlock;
+    }
+    
+    /**
+     * Renders the given RSS's entries.
+     * @param parentBlock the parent Block to which the output is going to be added
+     * @param feed the RSS Channel we retrieved via the Feed URL
+     * @param paramObj our parameter helper object
+     * @param context the macro's transformation context
+     * @throws MacroExecutionException if the content cannot be rendered
+     */ 
+
+    private void renderEntries(Block parentBlock, SyndFeed feed, RssMacroParameters paramObj, 
+        MacroTransformationContext context) throws MacroExecutionException 
+    {
+        int maxElements = paramObj.getCount();
+        int count = 0;
+
+        for (Object item : feed.getEntries()) {
+            ++count;
+            if (count > maxElements) {
+                break;
+            }
+            SyndEntry entry = (SyndEntry) item;
+            
+            BoxMacroParameters boxParameters = new BoxMacroParameters();
+    
+            if (paramObj.isCss()) {
+                boxParameters.setCssClass("rssitem");
+            }
+            
+            renderTitle(boxParameters, paramObj.isCss(), "rssitemtitle", entry.getTitle(), entry.getLink());
+            
+            List<Block> entryBlocks = boxMacro.execute(boxParameters, "", context);
+                   
+            //we check if we need to display the full contents of the feed or just the title.
+            if (paramObj.isFull() && entry.getDescription() != null) {
+                ParagraphBlock descriptionBlock = new ParagraphBlock(
+                    getParserUtils().parseInlineNonWiki(entry.getDescription().getValue()));
+                if (paramObj.isCss()) {
+                    descriptionBlock.setParameter(CLASS_ATTRIBUTE, "rssitemdescription");
+                }
+                entryBlocks.get(0).addChild(descriptionBlock);
+            }
+            parentBlock.addChildren(entryBlocks);
+        }
+    }
+
+    /** 
+     * {@inheritDoc}
+     * @see org.xwiki.rendering.macro.Macro#supportsInlineMode()
+     */
+    public boolean supportsInlineMode()
+    {
+        return false;
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     * @see org.xwiki.rendering.macro.Macro#execute(Object, String, MacroTransformationContext)
+     */
+    public List<Block> execute(RssMacroParameters parameters, String content, MacroTransformationContext context)
+        throws MacroExecutionException
+    {
+        SyndFeedInput input = new SyndFeedInput();
+        SyndFeed feed = null;
+        try {
+            feed = input.build(new XmlReader(parameters.getFeedURL()));
+        } catch (Exception ex) {
+            throw new MacroExecutionException("Error processing " + parameters.getFeedURL() + ": " + ex.getMessage());
+        }
+        if (feed == null) { 
+            throw new MacroExecutionException("No feed found at " + parameters.getFeedURL());
+        }
+        
+        BoxMacroParameters boxParameters = new BoxMacroParameters();
+        boolean hasImage = parameters.isImg() && feed.getImage() != null;
+
+        if (parameters.isCss()) {
+            boxParameters.setCssClass("rssfeed");
+        }
+        renderTitle(boxParameters, parameters.isCss(), "rsschanneltitle", feed.getTitle(), feed.getLink());
+
+        List<Block> result = null;
+        if (hasImage) {
+            boxParameters.setImage(feed.getImage().getUrl());
+            result = boxMacro.execute(boxParameters, content, context);
+
+            //we align properly all the image blocks
+            for (Block resultBlock : result) {
+                for (Block child : resultBlock.getChildren()) {
+                    if (child instanceof ImageBlock) {
+                        ((ImageBlock) child).setParameter("align", parameters.getAlign());
+                    }
+                }
+            }
+        } else {
+            result = boxMacro.execute(boxParameters, content, context);
+        }
+        
+        renderEntries(result.get(0), feed, parameters, context);
+
+        Block searchBlock = renderSearch(feed, parameters, context);
+        if (searchBlock != null) {
+            result.add(searchBlock);
+        }
+        return result;
+    }
+    
+    /**
+     * Renders the RSS's title.
+     * @param boxParameters the BoxParameters where the title will be fitted
+     * @param isCss whether CSS formatting should be applied
+     * @param cssClass the CSS sheet
+     * @param title the title's text
+     * @param link the title's link (if there is one)
+     */
+    private void renderTitle(BoxMacroParameters boxParameters, boolean isCss, 
+        String cssClass, String title, String link) {
+        List<Block> titleBlocks = null;
+        
+        if (link == null) {
+            titleBlocks = getParserUtils().parseInlineNonWiki(title);
+        } else {
+            Link titleLink = new Link();
+            titleLink.setReference(link);
+            titleLink.setType(LinkType.URI);
+            Block linkBlock = new LinkBlock(getParserUtils().parseInlineNonWiki(title), titleLink, true);
+            titleBlocks = Collections.singletonList(linkBlock);
+        }
+        ParagraphBlock titleBlock = new ParagraphBlock(titleBlocks);
+        if (isCss) {
+            titleBlock.setParameter(CLASS_ATTRIBUTE, cssClass);
+        }
+        
+        boxParameters.setBlockTitle(Collections.singletonList(titleBlock));
+    }
+}
Index: core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/pom.xml
===================================================================
--- core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/pom.xml	(revision 0)
+++ core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/pom.xml	(revision 0)
@@ -0,0 +1,51 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <artifactId>xwiki-core-macros-parent</artifactId>
+    <groupId>org.xwiki.platform</groupId>
+    <version>1.8-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.xwiki.platform</groupId>
+  <artifactId>xwiki-core-rendering-macro-rss</artifactId>
+  <name>XWiki Platform - Macro - RSS Reader</name>
+  <version>1.8-SNAPSHOT</version>
+  <description>XWiki Platform - Macro - RSS Reader</description>
+  <repositories>
+	<repository>
+  	  <id>maven2-repository.dev.java.net</id>
+  	  <name>Java.net Repository for Maven</name>
+  	  <url>http://download.java.net/maven/2/</url>
+	  <layout>default</layout>
+	</repository>
+  </repositories>
+  <build>
+	<plugins>
+      <plugin>
+        <!-- Apply the Checkstyle configurations defined in the top level pom.xml file -->
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <includes>
+            <include>**/RenderingTests.java</include>
+          </includes>
+        </configuration>
+      </plugin>
+  	</plugins>
+  </build>
+  <dependencies>
+	<dependency>
+      <groupId>rome</groupId>
+      <artifactId>rome</artifactId>
+      <version>1.0RC2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.xwiki.platform</groupId>
+      <artifactId>xwiki-core-rendering-macro-box</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+  </dependencies>
+</project>
\ No newline at end of file
Index: core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/test/resources/META-INF/plexus/components.xml
===================================================================
--- core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/test/resources/META-INF/plexus/components.xml	(revision 0)
+++ core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/test/resources/META-INF/plexus/components.xml	(revision 0)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ *
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *
+-->
+
+<component-set>
+  <components>
+    <!-- Components used for testing -->
+    <component>
+      <role>org.xwiki.rendering.macro.Macro</role>
+      <role-hint>testrssmacro</role-hint>
+      <implementation>org.xwiki.rendering.macro.rss.TestRssMacro</implementation>
+      <instantiation-strategy>singleton</instantiation-strategy>
+      <requirements>
+        <requirement>
+          <role>org.xwiki.rendering.macro.Macro</role>
+          <role-hint>box</role-hint>
+          <field-name>boxMacro</field-name>
+        </requirement>
+      </requirements>
+    </component>
+  </components>
+</component-set>
Index: core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/main/java/org/xwiki/rendering/macro/rss/RssMacroParameters.java
===================================================================
--- core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/main/java/org/xwiki/rendering/macro/rss/RssMacroParameters.java	(revision 0)
+++ core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/main/java/org/xwiki/rendering/macro/rss/RssMacroParameters.java	(revision 0)
@@ -0,0 +1,196 @@
+/*
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.xwiki.rendering.macro.rss;
+
+import java.net.URL;
+
+import org.xwiki.rendering.macro.descriptor.ParameterDescription;
+import org.xwiki.rendering.macro.descriptor.ParameterMandatory;
+
+/**
+ * Parameters for the {@link org.xwiki.rendering.internal.macro.rss.RssMacro} Macro.
+ * 
+ * @version $Id: $
+ * @since 1.7
+ */
+public class RssMacroParameters
+{
+    /**
+     * The default alignment for the feed's image.
+     */
+    public static final String DEFAULT_ALIGNMENT = "left";
+    /**
+     * The alignment of the feed's image (in case there is one).
+     */
+    private String align = DEFAULT_ALIGNMENT;
+    /**
+     * If "true" and if the feed has an image, display it.
+     */
+    private boolean img;
+    /**
+     * If "true" then adds class id elements (rssitem, rssitemtitle, rssitemdescription, rsschanneltitle, etc) 
+     * which you can style by modifying your skin's CSS file.
+     */
+    private boolean css;
+    /**
+     * The number of feed items to display.
+     */
+    private int count = Integer.MAX_VALUE;
+    /**
+     * The RSS feed URL.
+     */
+    private URL feedURL;
+    /**
+     * The RSS feed URL stored as a String.
+     */
+    private String feed;
+    /**
+     * If "true" displays a summary in addition to the feed item link.
+     */
+    private boolean full;
+    /**
+     * If "true" and if the feed as a search field, then this field will be displayed.
+     */
+    private boolean search;
+
+    /**
+     * @return the RSS feed URL.
+     */
+    public String getFeed() {
+        return feed;
+    }
+    /**
+     * @param feed the RSS feed URL.
+     * @throws java.net.MalformedURLException if the URL is malformed.
+     */
+    @ParameterMandatory
+    @ParameterDescription("the RSS feed URL")
+    public void setFeed(String feed) throws java.net.MalformedURLException
+    {
+        this.feed = feed;
+        this.feedURL = new java.net.URL(feed);
+    }
+    
+    /**
+     * @param align the alignment of the feed's image (in case there is one).
+     */
+    @ParameterDescription("the alignment of the feed's image (in case there is one)")
+    public void setAlign(String align) {
+        this.align = align;
+    }
+    /**
+     * @return the alignment of the feed's image (in case there is one).
+     */
+    public String getAlign() {
+        return align;
+    }
+    
+    /**
+     * @param img whether to display the feed's image.
+     */
+    @ParameterDescription("whether to display the feed's image")
+    public void setImg(boolean img) {
+        this.img = img;
+    }
+    /**
+     * @return the feed's image
+     */
+    public boolean isImg() {
+        return img;
+    }
+    
+    /**
+     * @param css whether to add class id elements (rssitem, rssitemtitle, rssitemdescription, rsschanneltitle, etc).
+     */
+    @ParameterDescription("whether to add class id elements (rssitem, rssitemtitle, rssitemdescription etc)")
+    public void setCss(boolean css) {
+        this.css = css;
+    }
+    /**
+     * @return whether to add class id elements (rssitem, rssitemtitle, rssitemdescription, rsschanneltitle, etc).
+     */
+    public boolean isCss() {
+        return this.css;
+    }
+    
+    /**
+     * @param count the number of feed items to display.
+     */
+    @ParameterDescription("the number of feed items to display")
+    public void setCount(int count) {
+        this.count = count;
+    }
+    /**
+     * @return the number of feed items to display.
+     */
+    public int getCount() {
+        return count;
+    }
+    
+    /**
+     * @return the feed's URL
+     */
+    public URL getFeedURL() {
+        return feedURL;
+    }
+
+    /**
+     * Given <code>proposed</code> items and the current value of our
+     * <code>count</code> property, how many items should be processed?
+     * @param proposed the proposed number of values
+     * @return <code>proposed</code>, if <code>count</code> is undefined or greater than <code>proposed</code>
+     * otherwise <code>count</code>
+     */
+    public int evalCount(int proposed) {
+        if (this.count < proposed) {
+            return this.count;
+        }
+        return proposed;
+    }
+    
+    /**
+     * @param full if "true" displays a summary in addition to the feed item link.
+     */
+    @ParameterDescription("if 'true' displays a summary in addition to the feed item link")
+    public void setFull(boolean full) {
+        this.full = full;
+    }
+    /**
+     * @return if "true" displays a summary in addition to the feed item link
+     */
+    public boolean isFull() {
+        return full;
+    }
+    
+    /**
+     * @param search if "true" and if the feed as a search field, then this field will be displayed.
+     */
+    @ParameterDescription("if 'true' and if the feed as a search field, then this field will be displayed.")
+    public void setSearch(boolean search) {
+        this.search = search;
+    }
+    /**
+     * @return if "true" and if the feed as a search field, then this field will be displayed.
+     */
+    public boolean isSearch() {
+        return search;
+    }
+}
Index: core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/test/resources/feed.xml
===================================================================
--- core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/test/resources/feed.xml	(revision 0)
+++ core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/test/resources/feed.xml	(revision 0)
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<rss version="2.0">
+  <channel>
+    <title>Lift Off News</title>
+    <link>http://liftoff.msfc.nasa.gov/</link>
+    <description>Liftoff to Space Exploration.</description>
+    <language>en-us</language>
+    <pubDate>Tue, 10 Jun 2003 04:00:00 GMT</pubDate>
+    <lastBuildDate>Tue, 10 Jun 2003 09:41:01 GMT</lastBuildDate>
+    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
+    <generator>Weblog Editor 2.0</generator>
+    <managingEditor>editor@example.com</managingEditor>
+    <webMaster>webmaster@example.com</webMaster>
+    <ttl>5</ttl>
+ 
+    <item>
+      <title>Star City</title>
+      <link>http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp</link>
+      <description>How do Americans get ready to work with Russians aboard the
+        International Space Station? They take a crash course in culture, language
+        and protocol at Russia's Star City.</description>
+      <pubDate>Tue, 03 Jun 2003 09:39:21 GMT</pubDate>
+      <guid>http://liftoff.msfc.nasa.gov/2003/06/03.html#item573</guid>
+    </item>
+ 
+    <item>
+      <title>Space Exploration</title>
+      <link>http://liftoff.msfc.nasa.gov/</link>
+      <description>Sky watchers in Europe, Asia, and parts of Alaska and Canada
+        will experience a partial eclipse of the Sun on Saturday, May 31st.</description>
+      <pubDate>Fri, 30 May 2003 11:06:42 GMT</pubDate>
+      <guid>http://liftoff.msfc.nasa.gov/2003/05/30.html#item572</guid>
+    </item>
+ 
+    <item>
+      <title>The Engine That Does More</title>
+      <link>http://liftoff.msfc.nasa.gov/news/2003/news-VASIMR.asp</link>
+      <description>Before man travels to Mars, NASA hopes to design new engines
+        that will let us fly through the Solar System more quickly.  The proposed
+        VASIMR engine would do that.</description>
+      <pubDate>Tue, 27 May 2003 08:37:32 GMT</pubDate>
+      <guid>http://liftoff.msfc.nasa.gov/2003/05/27.html#item571</guid>
+    </item>
+ 
+    <item>
+      <title>Astronauts' Dirty Laundry</title>
+      <link>http://liftoff.msfc.nasa.gov/news/2003/news-laundry.asp</link>
+      <description>Compared to earlier spacecraft, the International Space
+        Station has many luxuries, but laundry facilities are not one of them.
+        Instead, astronauts have other options.</description>
+      <pubDate>Tue, 20 May 2003 08:56:02 GMT</pubDate>
+      <guid>http://liftoff.msfc.nasa.gov/2003/05/20.html#item570</guid>
+    </item>
+  </channel>
+</rss>
\ No newline at end of file
Index: core/xwiki-core/pom.xml
===================================================================
--- core/xwiki-core/pom.xml	(revision 16022)
+++ core/xwiki-core/pom.xml	(working copy)
@@ -599,6 +599,13 @@
     </dependency>
     <dependency>
       <groupId>org.xwiki.platform</groupId>
+      <artifactId>xwiki-core-rendering-macro-rss</artifactId>
+      <version>${pom.version}</version>
+      <!-- Only needed at runtime since it's a component implementation -->
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.xwiki.platform</groupId>
       <artifactId>xwiki-core-rendering-macro-code</artifactId>
       <version>${pom.version}</version>
       <!-- Only needed at runtime since it's a component implementation -->
Index: core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/test/java/org/xwiki/rendering/macro/rss/TestRssMacro.java
===================================================================
--- core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/test/java/org/xwiki/rendering/macro/rss/TestRssMacro.java	(revision 0)
+++ core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/test/java/org/xwiki/rendering/macro/rss/TestRssMacro.java	(revision 0)
@@ -0,0 +1,55 @@
+package org.xwiki.rendering.macro.rss;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.util.List;
+
+import org.xwiki.rendering.block.Block;
+import org.xwiki.rendering.internal.macro.rss.RssMacro;
+import org.xwiki.rendering.macro.MacroExecutionException;
+import org.xwiki.rendering.macro.rss.RssMacroParameters;
+import org.xwiki.rendering.transformation.MacroTransformationContext;
+
+/**
+ * A mock macro which invokes, in turn, the Rss Macro setting its feed to a test feed.xml file.
+ * 
+ * @version $Id: $
+ * @since 1.7
+ */
+public class TestRssMacro extends RssMacro
+{
+    public TestRssMacro()
+    {
+        //this.boxMacro = new MockBoxMacro();
+    }
+    /**
+     * {@inheritDoc}
+     * 
+     * @see org.xwiki.rendering.macro.Macro#execute(Object, String, MacroTransformationContext)
+     */
+    public List<Block> execute(RssMacroParameters parameters, String content, MacroTransformationContext context)
+        throws MacroExecutionException
+    {
+        RssMacroParameters rssParameters = new RssMacroParameters();
+        rssParameters.setSearch(true);
+        rssParameters.setFull(true);
+        
+        File rssFeed = new File("src" + File.separatorChar + "test" + File.separatorChar + "resources", "feed.xml"); 
+        try {
+            rssParameters.setFeed(rssFeed.toURL().toString());
+        } catch (MalformedURLException e) {
+            throw new MacroExecutionException(e.getMessage());
+        }
+
+        return super.execute(rssParameters, content, context);
+    }
+
+    /** 
+     * {@inheritDoc}
+     * @see org.xwiki.rendering.macro.Macro#supportsInlineMode()
+     */
+    public boolean supportsInlineMode()
+    {
+        return false;
+    }
+}
Index: core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/test/java/org/xwiki/rendering/RenderingTests.java
===================================================================
--- core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/test/java/org/xwiki/rendering/RenderingTests.java	(revision 0)
+++ core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/test/java/org/xwiki/rendering/RenderingTests.java	(revision 0)
@@ -0,0 +1,42 @@
+/*
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.xwiki.rendering;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+
+import org.xwiki.rendering.scaffolding.RenderingPlexusTestSetup;
+import org.xwiki.rendering.scaffolding.RenderingTestSuite;
+
+/**
+ * All Rendering integration tests defined in text files using a special format.
+ * 
+ * @version $Id: RenderingTests.java 14966 2008-12-30 12:39:26Z tmortagne $
+ * @since 1.7M3
+ */
+public class RenderingTests extends TestCase
+{
+    public static Test suite() throws Exception
+    {
+        RenderingTestSuite suite = new RenderingTestSuite("Test Rss Macro");
+        suite.addTestsFromResource("macrorss1", true);
+        return new RenderingPlexusTestSetup(suite);
+    }
+}
