XWiki Syntax Mapping

Last modified by Vincent Massol on 2024/11/19 16:12

 XWiki
 Implementation
 Completed

Description

The idea is to have only one unique syntax with different macro/scripting engines behind.

Why not write a first parser that will look for specific tags and transform them from radeox to velocity.

There would be a config file editable from the wiki to give the way it works. Basically it is a definition of the velocity functions available and the parameter names and position:

includeTopic=name
anchor=name
toc=
image=name,width,height

This would mean

\{image:filename|50|50} or \{image:name=filename|width=50|height=50}or 
\{image:width=50|height=50|name=filename.jpg} would be all converted to 
#image("filename.jpg" "50" "50")
and
\{image:filename} would be converted to #image("filename.jpg" "" "")

We could have the same in the future for Groovy and this way would be kept completely independent of the way macros are actually implemented. This would give a unique syntax with a powerfull extension method, close to the best of both worlds.


 

Get Connected