maven-doxia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Massol <vinc...@massol.net>
Subject Re: Need for onWords events (and more)?
Date Mon, 31 Dec 2007 13:10:18 GMT

On Dec 31, 2007, at 1:45 PM, Vincent Massol wrote:

> Hi,
>
> I've been thinking about some use case we might have in XWiki and  
> I'm wondering how to solve them using Doxia.
>
> Imagine we want the rendering process to automatically look for word  
> definition on, say, wikipedia, and when found, highlight the word  
> and make the definition appear when the mouse hover over the word.

This is probably not the best use case since a better way of  
implementing this would be with a {definition} macro.

Here's another one: adding support for wikiwords and render them as  
links.

Of course if this is a core feature it can be implemented in the  
parser itself. However in case of XWiki it's not a core feature but I  
know some users have asked for it. The way we currently support this  
is by allowing users to customize the rendering process by adding  
radeox filters. The way I would expect users to do it with Doxia would  
be by extending the XWiki Sink classes or providing their own Sink. I  
think it would be way harder to offer hook points into the parser for  
users.

> How would we do this with Doxia since there's no onWord event?

Of course it's possible for the sinks to parse the strings passed to  
the text() event. However this is probably a job best left to the  
parsers IMO.

WDYT?

> Wikimodel does have such an event (they even have events such as  
> onSpace and onSpecialSymbol, onEmptyLines, onEscape, etc):
> http://tinyurl.com/yuuh2d

Thanks
-Vincent


Mime
View raw message