Doxia Issues & Gotchas

This document collects some infos about specific issues and 'gotchas' when working with Doxia. Please check also the Frequently Asked Questions.

Apt anchors and links

Using Doxia 1.1 you may see a lot of warnings when processing old Apt source files:

[WARNING] [Apt Parser] Ambiguous link: 'doxia-apt.html'. If this is a local link, prepend "./"!


[WARNING] [Apt Parser] Modified invalid link: references/doxia-apt.html

The reason is that in Apt, links to other source documents have to start with either ./ or ../ to distinguish them from internal links. Please read the sections on anchors and links in our Apt guide. Note in particular that internal links in Apt do not start with '#'.

You should pay attention to these warnings since your links will most likely be broken. Unfortunately, the warning message cannot indicate the source file with the broken link (see eg MPDF-11), however, if you run in DEBUG mode, eg invoke maven with the -X switch, you can see which source document is being parsed when the warning is emitted.

Figure sink events

Doxia distinguishes between figures, which are block-level elements, and images (or icons), which are in-line elements. For instance, the following sequence of sink events

sink.figure( null );

sink.figureGraphics( "figure.png", null );

sink.figureCaption( null );
sink.text( "Figure caption", null );


should output the equivalent of this html snippet:

<div class="figure">
  <p><img src="figure.png"/></p>
  <p>Figure caption</p>

while the figureGraphics( ... ); event alone can be used to generate an in-line image, i.e. just the <img> tag in case of html.

Note that we are using the forms that take a SinkEventAttributeSet above, even though we are just passing in null values. The reason is that the alternative forms (without SinkEventAttributeSet) have a different behavior, which is kept for backward compatibility (but the methods have been deprecated). Using the same sequence of sink events as above, but omitting the null method parameters, will generate

<img src="figure.png" alt="Figure caption"/>

Empty Generated Page

After running mvn site using your Maven reporting plugin, you see that the generated page is empty. Be sure that the the code calls sink.close().