On Tue, May 17, 2011 at 11:29, Fabio Mancinelli
<fabio.mancinelli(a)xwiki.com> wrote:
Hi Jun
On Tue, May 17, 2011 at 9:16 AM, Jun Han <jun.han37(a)gmail.com> wrote:
Dear all,
Regarding REST API for XWiki,
Source codes are in
xwiki-trunk/xwiki-platform/xwiki-platform-core/xwiki-platform-rest.
Test codes are in
xwiki-trunk/xwiki-enterprise/xwiki-enterprise-test/xwiki-enterprise-test-rest.
I hope I am looking at the correct places.
Correct.
XWiki-5820 is related to adding an endpoint for
providing a rendered
version of the page.
Does REST API need to invoke xwiki-rendering library in order to render
the html content?
There are several getRenderedContent() methods in the Document
class... It should be enough to call them.
The current implementation will return various
resources, (e.g., pages,
tags, attachments), and produce XML responses in most cases.
In XWiki-5820, only page resources will be rendered, right?
A straight-forward way may be to add additional end point (getPage and
getPageInHTML), and they will be invoked according to different Accept
http headers.
It would be great that an example can be given to show the expected
input and output.
Actually this is a good question...
The original purpose of this resource was to provide a rendered
version of a page (typically in HTML).
Now, provided that we render in HTML, how this HTML should be returned?
If we render with the complete skin we would end up with the same
content already available from http://.../xwiki/bin/view/Space/Page
So the idea was to return the "bare HTML" that could be emdedded in
other contexts.
Which is also possible in "view mode", Actually if it's only about
getting the rendering content of the document you can do it in
whatever language you want and without the UI using /get/ action or
even /view/ action with some parameters.
For the input we can consider Accept headers and media parameters
(already handled by the backend)
Thanks,
Fabio
Best regards
Jun Han
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs