XWiki Rendering Framework

Last modified by Vincent Massol on 2015/08/02 18:11

Mission: Transform some textual input content in a given syntax into an output content in another syntax.

General Architecture


  • Parser: Parses some textual input in a given syntax and generate a XDOM object which is an AST representing the input into structured blocks.
  • Renderer: Takes a XDOM as input and generates some output.
  • Transformation: Takes some XDOM and modifies it to generate a modified XDOM.

See Advanced Architecture for more details.


  • Parsers for multiple syntaxes.
  • Offers both a streaming API (useful for rendering large content) and an XDOM-based API (generates an intermediary AST on which transformations - such as macros - can be applied)
  • Round trip between XWiki Syntax 2.0 and XHTML. This features allows for example to have a strong WYSIWYG editor that doesn't loose information when editing wiki pages. Another use case is the ability to import Office documents in HTML and transform them into XWiki Syntax 2.0 without loosing information.
  • Ability to get the result of the parsing as an AST tree (called XDOM) which can then be used to get access to all structured elements from the flat text input.
  • Ability to transform the XDOM through a Transformation (list of of available Transformations).
  • Macro support (list of available Macros). Note that Macro support is implemented as a Transformation (see Architecture).
  • Supports wiki syntax in link labels even for input syntaxes that don't support it.
  • Automatic conversion from any of the supported input syntaxes to XWiki Syntax 2.0 or to XHTML.
  • Strong Parsers:
    • Based on Grammars (JavaCC)
    • Fix user mistakes (not closed or overlapping markup elements...).
    • Each block element (paragraph, table cells, list items, headers...) can spread over multiply lines.
    • Support for groups, i.e. ability to include content inside other content (equivalent of DIV in HTML).
    • All elements can have parameters associated to them.
  • Been used in XWiki Enteprise for several years and is stable and performant.
  • Can be used standalone since it's independent of other XWiki projects such as XWiki Platform, XWiki Enterprise, etc.

The XWiki Rendering modules are all released under the LGPL license.

Supported Syntaxes

Input Syntax
It means there's a Parser that can be used to parse this syntax into a XDOM object
Output Syntax
It means there's a Renderer that can be used to render an XDOM into this syntax
NameIdInput Syntax?Output Syntax?Description
XWiki 2.0xwiki/2.0acceptaccept
XWiki 2.1xwiki/2.1acceptacceptExperimental at this stage which means it can still change before it's released as final.
XHTML 1.0xhtml/1.0acceptaccept
HTML 5.0html/5.0cancelacceptAvailable in XWiki Rendering 6.4+ only.
HTML 4.01html/4.01acceptaccept
Plain Textplain/1.0acceptacceptPrint all than can be rendered in a simple notepad-like editor such as words, special symbols and spaces. It also generates link labels for links that have no labels and print the generated labels. Last it provides very basic formatting (e.g. separates paragraphs with new lines and separates list items with new lines).
DocBook 4.4docbook/4.4acceptacceptAvailable in XWiki Rendering 3.2+ only.
XDOM XML Currentxdom+xml/curentacceptacceptAvailable in XWiki Rendering 3.3+ only.
XDOM XML 1.0xdom+xml/1.0acceptacceptAvailable in XWiki Rendering 3.3+ only.
XWiki 1.0xwiki/1.0acceptcancel
Confluence XHTMLconfluence+xhtml/1.0acceptcancel
Creole 1.0creole/1.0acceptcancel
Markdown 1.0markdown/1.0acceptcancelAvailable in XWiki Rendering 3.4+ only.
Markdown 1.1markdown/1.1acceptcancelAvailable in XWiki Rendering 5.2+ only. Adds syntax for macros, superscript and subscript support over Markdown 1.0 syntax.
APTapt/1.0acceptacceptAvailable in XWiki Rendering 4.3+ only.


This simple demo converts your input written in one syntax to another syntax.

This demo currently runs on XWiki Rendering 7.1.1



Check the getting started tutorial which contains all information to access the XWiki Rendering binaries.

Source files are available here.

Projects using XWiki Rendering


Here are some libraries similar to XWiki Rendering in purpose:

Created by Admin on 2009/09/09 02:00

Get Connected