Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-103

XWiki Syntax Mapping for Velocity macros

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Fixed
    • Major
    • 0.9.1252
    • 0.9.840
    • {Unused} Wiki features
    • None

    Description

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

      Description (a snip from the devel mailing list):
      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.

      Attachments

        Activity

          People

            ldubost@free.fr Ludovic Dubost
            tepich Jiri Luzny
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: