Re: [xwiki-users] Parsing XWiki Syntax inside Macro
On Mar 27, 2012, at 10:13 AM, Grüner Heinrich wrote:
Hi Vincent, in my api "parse" returns a List<Block> and parseXDOM returns a XDOM. But I am still on 3.1 release.
Ok that's why. In 3.1 this component was private (it has an "internal" part in the package name),this means you're not supposed to use it because it's not a user public api and it can change at any time. We've made it in 3.3M1: https://github.com/xwiki/xwiki-rendering/commit/a3f012852f7b7caeaaf6205dca40... The new API starting in 3.3M1: https://github.com/xwiki/xwiki-rendering/blob/master/xwiki-rendering-transfo... Thanks -Vincent PS: Please don't answer privately to me and instead always send mails to the list so that we all see them and we can all answer and learn from them :)
Am 27.03.2012 09:31, schrieb Vincent Massol:
Hi Stefan,
On Mar 27, 2012, at 9:24 AM, Stefan Bernsdorf wrote:
Hi Vincent,
thanks for replying. There is a typo in your example. You have to remove .getChildren() in the code.
List <Block> blocks = this.contentParser.parse(content, context, true, context.isInline()).getChildren(); Thanks but it looks correct. parse() will return a XDOM and execute() needs a list of Blocks so you need to get them with XDOM.getChildren().
Thanks -Vincent
Am 27.03.2012 08:49, schrieb Vincent Massol:
Hi Stefan
On Mar 26, 2012, at 11:43 PM, Grüner Heinrich wrote:
Hi, i want the content of my Macro to be parsed as XWiki Syntax. How would that be possible. I cant find no parsing Method in AbstractMacro. When I want to extend AbstractScriptMacro then the initializing of the macro fails.
See http://rendering.xwiki.org/xwiki/bin/view/Main/ExtendingMacro#HParsingMacroC...
Thanks -Vincent
participants (1)
-
Vincent Massol