Doxia Modules Guide

Doxia has several built-in modules that support some standard markup languages, see the References page for an overview. The following is just a collection of reference links for the individual formats.

APT

APT (Almost Plain Text) is a simple text format.

References:

Confluence

Confluence is an Enterprise wiki from Atlassian. It uses Textile inside as an APT language.

References:

Simplified DocBook

DocBook is a markup language for technical documentation. Simplified DocBook is a simpler subset.

References:

FML

FML (FAQ Markup Language) is a FAQ markup language.

References:

iText

iText is a free Java/PDF library.

References:

FO (since Doxia 1.1)

XSL formatting objects (XSL-FO)

References:

LaTeX

LaTeX is a popular document markup language.

References:

TWiki

TWiki is a structured wiki.

References:

XDoc

XDoc is a generic format for document into a styled HTML document.

References:

XHTML

XHTML is a markup language with the same expressions as HTML, but also conforms to XML syntax.

References:

Using A Doxia Module

The following snippet shows how to use a Doxia Parser to transform an apt file to html:

  File userDir = new File( System.getProperty ( "user.dir" ) );
  File inputFile = new File( userDir, "test.apt" );
  File outputFile = new File( userDir, "test.html" );

  SinkFactory sinkFactory = (SinkFactory) lookup( SinkFactory.ROLE, "html" ); // Plexus lookup

  Sink sink = sinkFactory.createSink( outputFile.getParentFile(), outputFile.getName() ) );

  Parser parser = (AptParser) lookup( Parser.ROLE, "apt" ); // Plexus lookup

  Reader reader = ReaderFactory.newReader( inputFile, "UTF-8" );

  parser.parse( reader, sink );

It is recommended that you use Plexus to look up the parser. In principle you could instantiate the parser directly ( Parser parser = new AptParser(); ) but then some special features like macros will not be available.

You could also use the Doxia Converter Tool to parse a given file/dir to another file/dir.