[xwiki-devs] Should we have a vm file or a REST URL for getting a page's content?
Hi devs, Just realized that we don't have direct way of getting a page's content (only the content)… The best we can do is: http://playground.xwiki.org/xwiki/bin/view/Sandbox/WebHome?xpage=plain&outpu... But that converts the content to XWiki Syntax. Shouldn't we have a vm for just displaying the content? Or even better a REST URL? Thanks -Vincent
On Tue, Oct 16, 2012 at 3:56 PM, Vincent Massol <vincent@massol.net> wrote:
Hi devs,
Just realized that we don't have direct way of getting a page's content (only the content)…
The best we can do is: http://playground.xwiki.org/xwiki/bin/view/Sandbox/WebHome?xpage=plain&outpu...
But that converts the content to XWiki Syntax.
Shouldn't we have a vm for just displaying the content? Or even better a REST URL?
AFAIR, I implemented something like that but I couldn't commit it because of a Restlet bug on content negotiation. Basically you could retrieve the plain text content by requesting a page and sending an "Accept: text/plain" header in the request. If I am not wrong, the guys at Restlest should have fixed that, so having this feature should be quite straightforward. -Fabio
Thanks -Vincent
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
What about http://playground.xwiki.org/xwiki/bin/view/Sandbox/WebHome?xpage=plain&outpu... Guillaume On Tue, Oct 16, 2012 at 4:02 PM, Fabio Mancinelli < fabio.mancinelli@xwiki.com> wrote:
On Tue, Oct 16, 2012 at 3:56 PM, Vincent Massol <vincent@massol.net> wrote:
Hi devs,
Just realized that we don't have direct way of getting a page's content (only the content)…
The best we can do is:
http://playground.xwiki.org/xwiki/bin/view/Sandbox/WebHome?xpage=plain&outpu...
But that converts the content to XWiki Syntax.
Shouldn't we have a vm for just displaying the content? Or even better a
REST URL?
AFAIR, I implemented something like that but I couldn't commit it because of a Restlet bug on content negotiation.
Basically you could retrieve the plain text content by requesting a page and sending an "Accept: text/plain" header in the request.
If I am not wrong, the guys at Restlest should have fixed that, so having this feature should be quite straightforward.
-Fabio
Thanks -Vincent
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
On Oct 16, 2012, at 4:13 PM, Guillaume Lerouge <guillaume@xwiki.com> wrote:
What about http://playground.xwiki.org/xwiki/bin/view/Sandbox/WebHome?xpage=plain&outpu...
It renders the content. -Vincent
Guillaume
On Tue, Oct 16, 2012 at 4:02 PM, Fabio Mancinelli < fabio.mancinelli@xwiki.com> wrote:
On Tue, Oct 16, 2012 at 3:56 PM, Vincent Massol <vincent@massol.net> wrote:
Hi devs,
Just realized that we don't have direct way of getting a page's content (only the content)…
The best we can do is:
http://playground.xwiki.org/xwiki/bin/view/Sandbox/WebHome?xpage=plain&outpu...
But that converts the content to XWiki Syntax.
Shouldn't we have a vm for just displaying the content? Or even better a
REST URL?
AFAIR, I implemented something like that but I couldn't commit it because of a Restlet bug on content negotiation.
Basically you could retrieve the plain text content by requesting a page and sending an "Accept: text/plain" header in the request.
If I am not wrong, the guys at Restlest should have fixed that, so having this feature should be quite straightforward.
-Fabio
Thanks -Vincent
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
A friend of mine made an xslt and shell script to do that with the xpage=xml. It would sure feel safer and better to have a true reference to such a thing. paul Le 16 oct. 2012 à 15:56, Vincent Massol a écrit :
Hi devs,
Just realized that we don't have direct way of getting a page's content (only the content)…
The best we can do is: http://playground.xwiki.org/xwiki/bin/view/Sandbox/WebHome?xpage=plain&outpu...
But that converts the content to XWiki Syntax.
Shouldn't we have a vm for just displaying the content? Or even better a REST URL?
Thanks -Vincent
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
On 10/16/2012 09:56 AM, Vincent Massol wrote:
Hi devs,
Just realized that we don't have direct way of getting a page's content (only the content)…
The best we can do is: http://playground.xwiki.org/xwiki/bin/view/Sandbox/WebHome?xpage=plain&outpu...
But that converts the content to XWiki Syntax.
Shouldn't we have a vm for just displaying the content? Or even better a REST URL?
http://www.xwiki.org/xwiki/bin/view/Main/WebHome?xpage=plain&raw=2 xpage=plain.vm has three modes, the normal one returns the rendered content, raw=1 returns the code, but XML-escaped with the HTML MIME type, and raw=2 returns the raw code with the text/plain MIME type. -- Sergiu Dumitriu http://purl.org/net/sergiu/
On Oct 16, 2012, at 8:46 PM, Sergiu Dumitriu <sergiu@xwiki.com> wrote:
On 10/16/2012 09:56 AM, Vincent Massol wrote:
Hi devs,
Just realized that we don't have direct way of getting a page's content (only the content)…
The best we can do is: http://playground.xwiki.org/xwiki/bin/view/Sandbox/WebHome?xpage=plain&outpu...
But that converts the content to XWiki Syntax.
Shouldn't we have a vm for just displaying the content? Or even better a REST URL?
http://www.xwiki.org/xwiki/bin/view/Main/WebHome?xpage=plain&raw=2
xpage=plain.vm has three modes, the normal one returns the rendered content, raw=1 returns the code, but XML-escaped with the HTML MIME type, and raw=2 returns the raw code with the text/plain MIME type.
ok great, didn't know that! We should document those parameters somewhere… Thanks Sergiu -Vincent
participants (5)
-
Fabio Mancinelli -
Guillaume Lerouge -
Paul Libbrecht -
Sergiu Dumitriu -
Vincent Massol