You have been discussing the ability to turn on and off Groovy or Velocity processing. I think it is necessary to go further and conditionally disable HTML as well.

I am putting together a wiki application aimed at general Internet users, i.e. I must assume minimal skills. I am having to do many things to simplify XWiki. There is no way I am going to tell my users, for example:

- to type &lt; instead of < or &amp; instead of &
- to avoid using # next to subsequent letters
- to be careful about the "$" character

My users won't know what HTML is and don't want to know. All I will do is give them information on a minimal set of wiki tags, and that will be challenge enough!

I will use HTML and Velocity in pages I create. Regardless of what Space those pages are in, they must be non-editable for end users. Pages created by end users must escape special HTML characters so that the pages display as expected.

Solutions:

 I think the processing categories which can be turned on and off should include Velocity, Groovy, HTML, and possibly even Wiki.

- In XWikiPreferences, specify which processing to perform for pages in the Space. (But this doesn't support per-page configuration?)
- Require a directive on the first line of the page, like:
    #use(vm, html)
 If it doesn't exist, default to Wiki processing only.

For backward compatibility, the default processing could be set in XWikiPreferences.

I'm going to have to go ahead and do something like this for myself shortly, so I'd be happy to help.

Trevor
http://www.condowiki.com


Stephen Schaub wrote:
I was hoping there would be a bit more discussion about this -- do the developers have any input on their plans to address some of these issues? Is there a need to start a Wiki page to document these and other related syntax-processing issues?

Stephen

From: "Stephen Schaub" <stephen_schaub_88@hotmail.com>
Reply-To: xwiki-dev@objectweb.org
To: xwiki-dev@objectweb.org
Subject: [xwiki-dev] Groovy, Velocity, and XWiki syntax processing issues
Date: Fri, 28 Oct 2005 09:46:13 -0400

When XWiki renders a document, the interactions between the Groovy, Velocity, and Wiki (Radeox?) syntax processing can lead to unexpected and undesirable behavior. There have been posts on this list in the past where this issue has been discussed. However, I'm not aware that any consensus has emerged as to how to deal with these problems.

To summarize, here are a few of the issues that I'm aware of:

* Getting XWiki to render a bit of text without doing any syntax processing on it can be difficult. For example, the {pre} ... {/pre} markup turns off XWiki syntax processing, but not Groovy processing.

* The # symbol is used both to do numbered lists and is also used for Groovy processing. If a user wants to create a numbered list and forgets to put a space after the #, he can run into trouble. The following example will cause a stack dump:

 #bring coffee
 #include doughnuts

* Code samples on a Wiki page sometimes don't render correctly, due to conflicts with Velocity syntax processing. The following C/C++ code sample results in a runtime stack dump:


4. Consider requiring users to explicitly enable Groovy/Velocity processing for selected Wiki documents as needed. In the page editor, provide two checkboxes: "Perform Groovy Processing" and "Perform Velocity Processing". The user could separately enable either Groovy or Velocity processing, or both. People who enable them would presumably be in a better position to deal with the kinds of syntax conflicts that would occur.
5. Provide more user-friendly error messages when a Groovy or Velocity processing exception occurs. Show the Wiki source line that caused the problem.

I haven't opened a JIRA issue for this yet, because I'm not sure how best to word it. But I think this is a high-priority issue that should be carefully addressed before the 1.0 release. This may be an issue that warrants a page on the xwiki.org developer site. I'll be glad to start one if the developers desire it -- perhaps here: http://www.xwiki.org/xwiki/bin/view/Dev/Discussions

Stephen




-- You receive this message as a subscriber of the xwiki-dev@objectweb.org mailing list. To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws