+1 for the idea and /plain/ It would be very nice for URL esthetics and REST simulation to have /plain/ and /feed/ but I am wondering if these align with the other actions we have: in the end, plain and feed rendering are still visualisations of the content (therefore "view" actions).
+1 for /feed/ with modifications: even if the viewable result for xpage=plain and xpage=rdf are the same, it's a different content type we're sending and that's good (particularly, rdf sends text/xml). The fact that modern browsers and readers handle the content the same it only means those are smart enough. Even if text/xml it's not the very right content type either, I think it is preferable over text/html. Happy coding, Anca Jerome Velociter wrote: > Hello devs, > > Yesterday I've applied Marius's XWIKI-2149 patch "Extend the FeedPlugin to > allow the creation of RSS/Atom feeds from any source". New RSS urls with > this revamped mechanism are of the type > "/xwiki/bin/view/Space/DocRss?xpage=plain" (while the current way is > /xwiki/bin/view/Space/DocRss?xpage=rdf"). I propose we add an action that > return the "plain.vm" velocity template as entry point to render the > document, and map a new "/feed/" action to it. This would allow us for > example to have a blog feed URL like this : "/xwiki/bin/feed/Main/BlogRss" > when the blog will actually use this new mechanism for its feed. > I would also like to map an action with a more generic name to it, like > "/plain/". "xpage=plain" is for example used when we create pseudo-REST > web services (for example, all the AJAX/gridview features in XE do use > URLs of that type). I believe it would be nice to have in the service > request URL only parameters linked to the actual service. Thus I would > propose we have something like > "/xwiki/bin/plain/XWiki/MyService?myparam1=myvalue&..." > > I am +1 for doing this, WDYT ? > > Now, I have a working version of this on my computer, but I'm not very > happy how it is done. basically, I followed the way the "attach" action > works : I added a PlainAction in com.xpn.xwiki.web that just returns > "plain" on render, and added the following action in struts-config action > mappings : > > <action path="/feed/" > type="com.xpn.xwiki.web.PlainAction" > name="feed" > scope="request"> > <forward name="feed" path="/templates/plain.vm"/> > </action> > > Is there a nicer way of doing this with struts ? > (At first, I tried to use "global-forwards" like <forward name="feed" > path="/templates/plain.vm"/>, but without success.) > > Thanks, > Jerome. > > > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

