Hi Vincent,

The figure handling is not very consistent across doxia modules anyway, it would be good to have at least an idea of how it should work...

Eg the img parsing in the xdoc module used to be handled via rawText, I changed that in alpha-9 but it is obviously less general now (if you just want to do xdoc -> html, see http://jira.codehaus.org/browse/MSITE-282 ).

Another open question is the handling of figure extensions, see http://jira.codehaus.org/browse/DOXIA-99.

I am not sure about the best way to go, personally I would prefer 2) over 1), but maybe we collect suggestions on the wiki page ( http://docs.codehaus.org/display/DOXIA/Proposed+Changes+to+the+Sink+API )?

Cheers,
-Lukas


Vincent Massol wrote:
Hi,

I'm progressing with the XWiki parser but I have to take a decision.

The XWiki image macro accepts several parameters:
http://code.xwiki.org/xwiki/bin/view/Macros/ImageMacro

However the Sink figure events only accepts a location and a caption.

I can see only 2 solutions:

1) Do not generate figure events but instead generate a Macro event (this is a new event I'd like to add to the Sink API, it would be a name and a Map of properties (name/value pairs)). This means that only sinks who understand the "image" macro will be able to correctly interpret the macro.

2) Add extra parameters to the figure event, in a generic way (by add a map of properties for example).

The issue with both 1) and 2) is that the parameters are non- standardized if we do it in a generic way and this will make it difficult to have interoperability with all sinks. However such an interoperability is anyway difficult and it's better to have the ability for a sink to fully understand a given format than not at all.

Any other idea?

Thanks
-Vincent



Reply via email to