Figure captions seem to go into the <img alt=""> attribute, ie they are not rendered in the xhtml output.
XhtmlSinkTest#getFigureBlock() seems to test this usecase and succeeds. Or are you talking about something else?
This issue is about the confluence parser. There is a test in doxia-site-renderer (see figure.confluence). As far as I can tell this test is not asserted, but the resulting figure.html file shows the defect.
The fix is simply to use sink events that take a SinkEventAttributeSet, see the Note at http://maven.apache.org/doxia/issues/#Figure_sink_events
I have checked by inspection that captions are rendered correctly in html output but got no time to properly implement a test case.
I start to understand the confusion.
org.apache.maven.doxia.sink.XhtmlBaseSink.figure() is marked as deprecated, but org.apache.maven.doxia.sink.Sink.figure() not.
This is a weird situation, where the implementation decided to deprecate a method from the API.
So the ConfluenceParser can call figure() unless the XhtmlBaseSink implementation is used.
We shouldn't accept special cases.
There are 2 options: deprecate org.apache.maven.doxia.sink.Sink.figure() or fix org.apache.maven.doxia.sink.XhtmlBaseSink.figure(). Agree?
Hmm, I hadn't realized that... From an objective point of view, I'd certainly go for option 2: XhtmlBaseSink.figure() should just forward to XhtmlBaseSink.figure( null ). Unfortunately, I don't remember the details but I suppose there were some backward-compat arguments to keep it the way it is, as otherwise I would not have specifically added the note linked above.
We probably have to break backwards compatibility, so pushing this forward to 2.0
Not sure if I'm missing something but I think this issue, concerning only the confluence parser, should be fixed in 1.x. Fixing the XhtmlBaseSink should probably go into 2.0.
A quick scan tells me that Sink.figure() is used by the ConfluenceParser, AptParser and TwikiParser.
So the hotfix should be implemented for all these Parsers, which implies that Sink.figure() would actually be deprecated.