Hello,
Testing Confluence spaces imports in XWiki 15.10, In the list of options in the 4th option under the section Input Configuration
there is this option:
PRODUCE RENDERING EVENTS FOR THE CONTENT
Parse the content to produce rendering events (if the output filter supports them)
boolean
which by default is set to false. What it is that is considered to be an event
or rendering events
for the content? What about the information related to output filter supporting them?
I would like to know what it is about?
In the XWiki Rendering framework (the framework in charge of linking a syntax parser with a syntax renderer), we call “event” the on* and begin/end* methods a parser is calling for each element interpreted in the source.
In the Confluence XML input filter, you have two choices:
- the page content is parsed and immediately converted into another syntax that the output filter will receive as a string and the identifier of the syntax of this string, this is the default
- the page content is parsed and the output filter just “receive” generic instruction on what was found in that content and decide how to serialize it
The main reason why 1.
is the default right now is that it’s not possible to express the content of a macro as generic events so it has to be converted right away and that’s only possible if the input filter knows the syntax in which it needs to convert the macro content (so when it’s itself in charge of converting the whole content).
Until the XWiki Rendering framework is refactored to support generic events as macro content, the mode 2.
is very rarely a good idea for a Confluence import use case.
1 Like
Thank you very much for your explanation. Then maybe, if in the future it is indeed refactored to support generic events, the option might be setup to true
as the default?
Yes, I would ideally prefer the input to produce only generic stuff and let the output decide how it wants to serialize all that. That’s actually how the Confluence input filter started but then came the need to convert the content of some macros I was a bit stuck with this design, so I moved to converting the wiki content on input side.
I understand that this is a tricky task to ensure. Thank you again for explaining, I’ll keep following here about follow ups, if it is possible.