On 17 Sep 2015 at 09:53:31, vincent(a)massol.net
(vincent@massol.net(mailto:vincent@massol.net)) wrote:
Hi Paul,
On 17 Sep 2015 at 09:36:30, Paul Libbrecht (paul@hoplahup.net(mailto:paul@hoplahup.net))
wrote:
Hello XWiki experts,
I'm porting confluence-syntax-pages from a confluence to my shiny new xwiki.
I've made a little tool to grasp the attachments (by hand) and am
copying the page content.
These pages were using two macros that I am try to reprogramme but am
failing thus far.
BTW do you know that we have a Confluence importer? :)
http://extensions.xwiki.org/xwiki/bin/view/Extension/Filter+Confluence+XML+…
I succeeded creating the macro with the easy
tutorial here
http://platform.xwiki.org/xwiki/bin/view/DevGuide/WikiMacroTutorial,
including content or parameters references in the XWiki 2.1 syntax but
in the confluence syntax I am failing:
- how can I specify macro parameters there?
- confluence macros do not have open and close tags. Does it mean it
cannot have content? If the macro requires content, an error is
displayed constantly that the content is missing.
If you’re interested in the Confluence grammar:
https://github.com/xwiki/xwiki-rendering/blob/ae956128c40efd0445e15d531d2bf…
So you can have params for example: {color:red}…{color}
From the grammar file it seems only some macros may be recognized… I don’t know why the
grammar doesn’t have a generic way to recognize a macro, this should probably be
improved.
Forget that, I misread. The grammar says:
| <#MACRO_PARAMS: ( <ESCAPED> | ~["}"] )* >
| <#MACRO: "{" <CHAR> <MACRO_PARAMS> "}” >
| <#MACRO_CONTENT: ( <ESCAPED> | <CHAR> | <SPACE>
|<NEW_LINE> | <SPECIAL_SYMBOL> ) >
| <#MACRO_BLOCK: "{"
(
"color" // TODO: {color:xx} paragraph {color}
…
)
<MACRO_PARAMS>
"}"
so it should work fine. I also see in ConfluenceWikiScanner.splitMacroParams() the code to
split the parameters.
I haven’t tried it for real though :)
Now I’d recommend that once you have a page in Confluence syntax inside XWiki, you convert
it to XWiki Syntax 2.1 and then you won’t have any problem in using any wiki macro or the
WYSIWYG editor and all features of XWiki in general.
Note: It’s still interesting to me to make macros work well in the confluence syntax so if
you want to continue on that path I’m happy to help as I can.
Thanks
-Vincent
Thanks
-Vincent
> thanks
>
> Paul