Jason van Zyl wrote:

On 28-Feb-08, at 5:16 AM, Lukas Theussl wrote:

Hi,

Following the discussions around DOXIA-204 [1] I have implemented the idea there, ie added a SinkEventAttributes parameter to all the relevant sink methods, for instance

public void figure( SinkEventAttributes attributes );


Is this just a map or are you providing some kind of type safety? If this is just a map of key/value pairs then why not just use a Map?

It could be a map, I only took an AttributeSet because the xml parsers and sinks already use MutableAttributeSets everywhere, so it was quick to generalize and re-use some methods.

I'm not sure about type safety actually, right now in the default implementation I am casting all keys and values to String when populating the Set, but I don't think this should be required.


I am still testing it with the little time I have available currently but it seems to work and I'd be ready to commit it on beta-1 trunk. As noted at DOXIA-204, this will solve (or allow to solve) a whole bunch of issues, but brings us one step further away from backward compatibility with the alpha branch (which is however already broken in current trunk anyway).

I have deployed my javadocs of doxia-sink-api [2], let me know if you have any comments on the design or if I can go ahead.

Thanks,
-Lukas


[1] http://jira.codehaus.org/browse/DOXIA-204
[2] http://people.apache.org/~ltheussl/staging-sites/doxia-sink-api/site/apidocs/


Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
jason at sonatype dot com
----------------------------------------------------------

Our achievements speak for themselves. What we have to keep track
of are our failures, discouragements and doubts. We tend to forget
the past difficulties, the many false starts, and the painful
groping. We see our past achievements as the end result of a
clean forward thrust, and our present difficulties as
signs of decline and decay.

-- Eric Hoffer, Reflections on the Human Condition



Reply via email to