Hi,
I want to parse XWiki Syntax in a independent thread (not via xwiki
default transformation workflow).
how is it possible to intantiate a valid MacroTransformationContext?
This Context is needed to call the contentParser.
I tried this:
MacroTransformationContext mc=new
MacroTransformationContext(new TransformationContext());
mc.setSyntax(Syntax.XWIKI_2_0);
contentParser.parse(ts.getContent(),mc,true,true);
but it threw the following Exception:
org.xwiki.rendering.macro.MacroExecutionException: Failed to parse
content [ == Werner == * test ]
at
org.xwiki.rendering.internal.macro.DefaultMacroContentParser.parseXDOM(DefaultMacroContentParser.java:122)
at
org.xwiki.rendering.internal.macro.DefaultMacroContentParser.parse(DefaultMacroContentParser.java:77)
at
org.centauron.xwiki.XWikiConnector.getCodeSnipsFromPage(XWikiConnector.java:117)
at
org.centauron.xwiki.XWikiConnector.getCodeSnipsFromPage(XWikiConnector.java:105)
...
Any suggestions?
Thanks,
Stefan.