XWiki Rendering Framework

Version 9.1 by Vincent Massol on 2011/03/11 16:06

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

General Architecture

rendering-architecture-simple.png

  • 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.

Features

  • 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.
  • Macro support.
  • 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.
  • 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.
  • Fixes 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.

Supported Syntaxes

Input Syntaxes:

  • XWiki Syntax 1.0 (xwiki/1.0)
  • XWiki Syntax 2.0 (xwiki/2.0)
  • Confluence Syntax (confluence/1.0)
  • JSPWiki Syntax (jspwiki/1.0)
  • TWiki Syntax (twiki/1.0)
  • Media Wiki Syntax (mediawiki/1.0)
  • Creole 1.0 Syntax (creole/1.0)
  • XHTML and HTML Syntaxes (xhtml/1.0 and html/4.01)
  • Plain Text (plain/1.0)

Output Syntaxes:

  • XWiki Syntax 2.0 (xwiki/2.0)
  • XHTML (xhtml/1.0)
  • Plain Text (plain/1.0): Print 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).

Documentation

Alternatives

Here are some libraries similar to XWiki Rendering in purpose:

Tags:
    
  • Powered by XWiki 14.10.18-node2. Hosted and managed by XWiki SAS

Get Connected