You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Borges Charles <ch...@yahoo.fr> on 2003/11/13 19:00:44 UTC

Serializers and SitemapModelComponent

Hi, 

Quoting the SitemapModelComponent interface javadoc:

"This interface marks a component as a sitemap
component that is used in the processing phase, like a
generator, a transformer, a SERIALIZER or a reader"

But the Serializer interface doesn't extends the
SiteMapModelComponent interface...

Is there a reason to avoid serializers from being a
sitemap component?

Let's say one would like to parametrize a
SVGSerializer (background color, ...) on a request
basis, how could it be achieved?


Thanks.


___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

Re: Serializers and SitemapModelComponent

Posted by Sylvain Wallez <sy...@apache.org>.
Borges Charles wrote:

>Hi, 
>
>Quoting the SitemapModelComponent interface javadoc:
>
>"This interface marks a component as a sitemap component that is used in the processing phase, like a generator, a transformer, a SERIALIZER or a reader"
>
>But the Serializer interface doesn't extends the SiteMapModelComponent interface...
>
>Is there a reason to avoid serializers from being a sitemap component?
>
>Let's say one would like to parametrize a SVGSerializer (background color, ...) on a request basis, how could it be achieved?
>  
>

Historically, serializers were considered as totally passive components, 
using only the incoming SAX stream to do their job. Now case like yours 
arise, and the usual answer was "put this information in the sax 
stream", which is obviously not convenient.

Lots of discussions came to a lazy consensus about finally allowing 
serializers to implement SitemapModelComponent, but this wasn't 
implemented until a few weeks ago, and this is now included in the 
latest 2.1.3 release (and of course the current CVS).

So just download this new release (it hasn't reached all mirrors yet) 
and add "implements SitemapModelComponent" to your serializer class 
and... provide us the patch!

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com