Thanks! Vincent and Asiri! On Sun, Jul 26, 2009 at 1:43 AM, Asiri Rathnayake < [email protected]> wrote
I haven't myself tried out clojure inside xwiki but I built a ruby macro<http://code.xwiki.org/xwiki/bin/view/Macros/RubyMacro>(for 2.0M2) just by following the steps I described to you :)
So is 2.0M2 required for me to implement a clojure macro similar to your ruby macro? When will 2.0M2 be released? Vincent Massol wrote:
Well all you need is drop the JSR223 jar in WEB-INF/lib and then you
can use the new language using the script macro: http://code.xwiki.org/xwiki/bin/view/Macros/ScriptMacro The above link suggests I should be using at least 2.0M1 to get the following option, which seems necessary for generating content-data other than HTML pages w/o extra wiki markup messing up the syntax: wikiyestrue/falsetrueindicate if the result of the script execution has to be parsed by the current wiki parser. If not it's put in a verbatim block.2.0 M1 Therefore, should I try this out with 2.0M1, or a current snapshot? I'm definitely +1 to make it part of the XWiki platform (same as for jruby) if you develop it. Similar to jruby I don't think we should package it in the default WAR though but as an optional download to install (will be even easier with the app manager). I'm willing to try. Please let me know what version of XE will give the best success at this integration. Once I get things working I will look more closely at creating a package analogous to Asiri's Ruby, except it will integrate Clojure. And yes I'd be willing to develop this package once I get things working. One of the things I'll need to do is generate content-type other than HTML as the result of a page containing a Clojure script. I'm particularly interested in outputting JSON (plaintext). I assume this will be feasible in 2.0M1 and later? I Looking forward to using a language designed explicitly for "list processing" to create lists of JSON data! Niels http://nielsmayer.com