[xwiki-devs] [PROPOSAL] Use plain text renderer with ?xpage=plain
Hi devs, In 2.0 architecture we have no way currently to print a strongly formatted text (like JSON) or simply a plain text without XHTML which we are doing generally using xpage=plain in XWiki 1.0 I propose to use the plain text renderer when xpage=plain and document is 2.0. The difference between the two is that in xwiki 1.0, wiki syntax generates xhtml when plain text renderer don't. But it's just because XWiki 1.0 does not ave the concept of different renders and the main goal of xpage=plain is JSON and things like that so this difference is not important IMO. Note that this is about supporting XWiki 1.0 "api", we need a generic way to indicate the renderer to use in the URL but that's another subject. For now we have to make xpage=plain works for both 1.0 and 2.0 content. WDYT ? -- Thomas Mortagne
On Mon, May 4, 2009 at 11:29, Thomas Mortagne <[email protected]> wrote:
Hi devs,
In 2.0 architecture we have no way currently to print a strongly formatted text (like JSON) or simply a plain text without XHTML which we are doing generally using xpage=plain in XWiki 1.0
See http://jira.xwiki.org/jira/browse/XWIKI-3413 for the jira issue
I propose to use the plain text renderer when xpage=plain and document is 2.0.
The difference between the two is that in xwiki 1.0, wiki syntax generates xhtml when plain text renderer don't. But it's just because XWiki 1.0 does not ave the concept of different renders and the main goal of xpage=plain is JSON and things like that so this difference is not important IMO.
Note that this is about supporting XWiki 1.0 "api", we need a generic way to indicate the renderer to use in the URL but that's another subject. For now we have to make xpage=plain works for both 1.0 and 2.0 content.
WDYT ?
-- Thomas Mortagne
-- Thomas Mortagne
I'm not very for this. I think we should keep xpage=plain for delivering HTML without the header and footer. It currently is delivering HTML by default unless you change the content type in your script. We could use a new template with could be "text" and would use the text content type. Ludovic Thomas Mortagne a écrit :
On Mon, May 4, 2009 at 11:29, Thomas Mortagne <[email protected]> wrote:
Hi devs,
In 2.0 architecture we have no way currently to print a strongly formatted text (like JSON) or simply a plain text without XHTML which we are doing generally using xpage=plain in XWiki 1.0
See http://jira.xwiki.org/jira/browse/XWIKI-3413 for the jira issue
I propose to use the plain text renderer when xpage=plain and document is 2.0.
The difference between the two is that in xwiki 1.0, wiki syntax generates xhtml when plain text renderer don't. But it's just because XWiki 1.0 does not ave the concept of different renders and the main goal of xpage=plain is JSON and things like that so this difference is not important IMO.
Note that this is about supporting XWiki 1.0 "api", we need a generic way to indicate the renderer to use in the URL but that's another subject. For now we have to make xpage=plain works for both 1.0 and 2.0 content.
WDYT ?
-- Thomas Mortagne
-- Ludovic Dubost Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost
On Mon, May 4, 2009 at 11:29 AM, Thomas Mortagne <[email protected]> wrote:
Hi devs,
In 2.0 architecture we have no way currently to print a strongly formatted text (like JSON) or simply a plain text without XHTML which we are doing generally using xpage=plain in XWiki 1.0
With the 1.0 syntax xpage=plain was mainly used to: 1/ Output data in special format (JSON, xls, etc). In those cases {pre} was used to avoid xhtml transformations. 2/ Output xhtml content without the XWiki UI, I can think of one use case where this content was put in ajax tooltips. Is 2/ covered ? Do we need a xpage=xhtml for it ? Note that xpage=xpart&vm=contentview.vm can be used as a workaround. Thanks, JV.
On May 4, 2009, at 12:46 PM, Jean-Vincent Drean wrote:
On Mon, May 4, 2009 at 11:29 AM, Thomas Mortagne <[email protected]> wrote:
Hi devs,
In 2.0 architecture we have no way currently to print a strongly formatted text (like JSON) or simply a plain text without XHTML which we are doing generally using xpage=plain in XWiki 1.0
With the 1.0 syntax xpage=plain was mainly used to: 1/ Output data in special format (JSON, xls, etc). In those cases {pre} was used to avoid xhtml transformations. 2/ Output xhtml content without the XWiki UI, I can think of one use case where this content was put in ajax tooltips.
Is 2/ covered ? Do we need a xpage=xhtml for it ? Note that xpage=xpart&vm=contentview.vm can be used as a workaround.
If you we want to have something clean for the future it seems to me that having a parameter called outputType (or simply output, or type, or contentType) which can take all renderer values would be best. For ex outputType=xhtml, xwiki, text, pdf, rtf, etc And when not specified it would default to outputType=xhtml. For removing the UI I'd use another parameter since it's orthogonal. Something like showUI=true|false Thanks -Vincent
On Mon, May 4, 2009 at 13:15, Vincent Massol <[email protected]> wrote:
On May 4, 2009, at 12:46 PM, Jean-Vincent Drean wrote:
On Mon, May 4, 2009 at 11:29 AM, Thomas Mortagne <[email protected]> wrote:
Hi devs,
In 2.0 architecture we have no way currently to print a strongly formatted text (like JSON) or simply a plain text without XHTML which we are doing generally using xpage=plain in XWiki 1.0
With the 1.0 syntax xpage=plain was mainly used to: 1/ Output data in special format (JSON, xls, etc). In those cases {pre} was used to avoid xhtml transformations. 2/ Output xhtml content without the XWiki UI, I can think of one use case where this content was put in ajax tooltips.
Is 2/ covered ? Do we need a xpage=xhtml for it ? Note that xpage=xpart&vm=contentview.vm can be used as a workaround.
If you we want to have something clean for the future it seems to me that having a parameter called outputType (or simply output, or type, or contentType) which can take all renderer values would be best.
For ex outputType=xhtml, xwiki, text, pdf, rtf, etc
And when not specified it would default to outputType=xhtml.
For removing the UI I'd use another parameter since it's orthogonal. Something like showUI=true|false
As i said this mail is about finding what to do with xpage=plain and not find the way to call the plain text renderer. I just want to know if we try to be able to use xpage=plain with 2.0 content or if we don't do anything an say that you have to do this another way for 2.0.
Thanks -Vincent _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
Thomas Mortagne wrote:
On Mon, May 4, 2009 at 13:15, Vincent Massol <[email protected]> wrote:
On May 4, 2009, at 12:46 PM, Jean-Vincent Drean wrote:
On Mon, May 4, 2009 at 11:29 AM, Thomas Mortagne <[email protected]> wrote:
Hi devs,
In 2.0 architecture we have no way currently to print a strongly formatted text (like JSON) or simply a plain text without XHTML which we are doing generally using xpage=plain in XWiki 1.0 With the 1.0 syntax xpage=plain was mainly used to: 1/ Output data in special format (JSON, xls, etc). In those cases {pre} was used to avoid xhtml transformations. 2/ Output xhtml content without the XWiki UI, I can think of one use case where this content was put in ajax tooltips.
Is 2/ covered ? Do we need a xpage=xhtml for it ? Note that xpage=xpart&vm=contentview.vm can be used as a workaround. If you we want to have something clean for the future it seems to me that having a parameter called outputType (or simply output, or type, or contentType) which can take all renderer values would be best.
For ex outputType=xhtml, xwiki, text, pdf, rtf, etc
And when not specified it would default to outputType=xhtml.
For removing the UI I'd use another parameter since it's orthogonal. Something like showUI=true|false
As i said this mail is about finding what to do with xpage=plain and not find the way to call the plain text renderer. I just want to know if we try to be able to use xpage=plain with 2.0 content or if we don't do anything an say that you have to do this another way for 2.0.
I think it's better to do it another way in 2.0 and keep xpage=plain compatible, so that pages that are called with this parameter (from AJAX requests for example) can be converted and keep offering their service. If we use a plain text renderer, it will break functionalities if/when converting to 2.0 (for example UI displayed in lightboxes, ajax updaters, etc) Jerome.
Thanks -Vincent _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Mon, May 4, 2009 at 13:49, Jerome Velociter <[email protected]> wrote:
Thomas Mortagne wrote:
On Mon, May 4, 2009 at 13:15, Vincent Massol <[email protected]> wrote:
On May 4, 2009, at 12:46 PM, Jean-Vincent Drean wrote:
On Mon, May 4, 2009 at 11:29 AM, Thomas Mortagne <[email protected]> wrote:
Hi devs,
In 2.0 architecture we have no way currently to print a strongly formatted text (like JSON) or simply a plain text without XHTML which we are doing generally using xpage=plain in XWiki 1.0 With the 1.0 syntax xpage=plain was mainly used to: 1/ Output data in special format (JSON, xls, etc). In those cases {pre} was used to avoid xhtml transformations. 2/ Output xhtml content without the XWiki UI, I can think of one use case where this content was put in ajax tooltips.
Is 2/ covered ? Do we need a xpage=xhtml for it ? Note that xpage=xpart&vm=contentview.vm can be used as a workaround. If you we want to have something clean for the future it seems to me that having a parameter called outputType (or simply output, or type, or contentType) which can take all renderer values would be best.
For ex outputType=xhtml, xwiki, text, pdf, rtf, etc
And when not specified it would default to outputType=xhtml.
For removing the UI I'd use another parameter since it's orthogonal. Something like showUI=true|false
As i said this mail is about finding what to do with xpage=plain and not find the way to call the plain text renderer. I just want to know if we try to be able to use xpage=plain with 2.0 content or if we don't do anything an say that you have to do this another way for 2.0.
I think it's better to do it another way in 2.0 and keep xpage=plain compatible, so that pages that are called with this parameter (from AJAX requests for example) can be converted and keep offering their service. If we use a plain text renderer, it will break functionalities if/when converting to 2.0 (for example UI displayed in lightboxes, ajax updaters, etc)
I breaks anyway, if you use plain text renderer it breaks lightboxes and if it use xhtml renderer it break JSON...
Jerome.
Thanks -Vincent _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
Thomas Mortagne a écrit :
On Mon, May 4, 2009 at 13:49, Jerome Velociter <[email protected]> wrote:
Thomas Mortagne wrote:
On Mon, May 4, 2009 at 13:15, Vincent Massol <[email protected]> wrote:
On May 4, 2009, at 12:46 PM, Jean-Vincent Drean wrote:
On Mon, May 4, 2009 at 11:29 AM, Thomas Mortagne <[email protected]> wrote:
Hi devs,
In 2.0 architecture we have no way currently to print a strongly formatted text (like JSON) or simply a plain text without XHTML which we are doing generally using xpage=plain in XWiki 1.0
With the 1.0 syntax xpage=plain was mainly used to: 1/ Output data in special format (JSON, xls, etc). In those cases {pre} was used to avoid xhtml transformations. 2/ Output xhtml content without the XWiki UI, I can think of one use case where this content was put in ajax tooltips.
Is 2/ covered ? Do we need a xpage=xhtml for it ? Note that xpage=xpart&vm=contentview.vm can be used as a workaround.
If you we want to have something clean for the future it seems to me that having a parameter called outputType (or simply output, or type, or contentType) which can take all renderer values would be best.
For ex outputType=xhtml, xwiki, text, pdf, rtf, etc
And when not specified it would default to outputType=xhtml.
For removing the UI I'd use another parameter since it's orthogonal. Something like showUI=true|false
As i said this mail is about finding what to do with xpage=plain and not find the way to call the plain text renderer. I just want to know if we try to be able to use xpage=plain with 2.0 content or if we don't do anything an say that you have to do this another way for 2.0.
I think it's better to do it another way in 2.0 and keep xpage=plain compatible, so that pages that are called with this parameter (from AJAX requests for example) can be converted and keep offering their service. If we use a plain text renderer, it will break functionalities if/when converting to 2.0 (for example UI displayed in lightboxes, ajax updaters, etc)
I breaks anyway, if you use plain text renderer it breaks lightboxes and if it use xhtml renderer it break JSON...
I'm for keeping xpage=plain for lightboxes and other HTML usages (the content in HTML without the skin) and we create other template for plain text output type. Ludovic
Jerome.
Thanks -Vincent _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Ludovic Dubost Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost
Jean-Vincent Drean wrote:
Note that xpage=xpart&vm=contentview.vm can be used as a workaround.
I'd rather not. xpart seems like a mistake to me, so it's better not to use it even more that it is used now. -- Sergiu Dumitriu http://purl.org/net/sergiu/
participants (6)
-
Jean-Vincent Drean -
Jerome Velociter -
Ludovic Dubost -
Sergiu Dumitriu -
Thomas Mortagne -
Vincent Massol