additions to sink api

View: New views
5 Messages — Rating Filter:   Alert me  

additions to sink api

by ltheussl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 );

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/

Re: additions to sink api

by Jason van Zyl-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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?

> 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




Re: additions to sink api

by ltheussl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



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
>
>
>

Re: additions to sink api

by Vincent Siveton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

+1

My only interrogation is why keys *and* values needs to be in lower
case... I refer to style which could contains both.

Cheers,

Vincent

2008/2/28, Lukas Theussl <ltheussl@...>:

> 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 );
>
>  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/
>

Re: additions to sink api

by ltheussl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It's badly expressed, the 'lower-case' is just a recommendation for new
attributes, the emphasis is on String. Apart from casting to String I
don't put any restrictions on the key/value pairs (old-style HTML
upper-case attributes also have to be supported). I will review the
javadocs anyway.

-Lukas


Vincent Siveton wrote:

> +1
>
> My only interrogation is why keys *and* values needs to be in lower
> case... I refer to style which could contains both.
>
> Cheers,
>
> Vincent
>
> 2008/2/28, Lukas Theussl <ltheussl@...>:
>
>>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 );
>>
>> 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/
>>
>
>