cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <>
Subject Re: Writing a Transformer, getting a Serializer
Date Tue, 04 Dec 2001 09:25:40 GMT
Jeremy Quinn wrote:
> At 4:30 pm +0100 3/12/01, Stefano Mazzocchi wrote:
> >Jeremy Quinn wrote:
> >
> >> Is this possible?
> >
> >Is shouldn't.
> >
> >> Am I looking at this the right way?
> >
> >I think so, what are you trying to achieve?
> XML File editing from HTML forms.
> Request Generator
> Followed by XSLT StyleSheet to set up XInclude tags
> Xinclude the editable content
> XSLT StyleSheet modifies the XIncluded content, using the output of the
> request generator.
> This content is then passed on to a "FileResourceWriterTransformer", which
> (either reacting to a namespace in the content or has been told which tag)
> outputs that content as a file on disk.
> Response prepared for user
> I need my Transformer to Serialise the Sax Events "between" it's trigger
> tags, to a File, provided a (pseudo protocol) URL.

Yes, this is more of an architectural question. For now, you can't call
a serializer like that. And I have the perception it would be wrong to
allow you to do it.

I would simply call the the serializing code that the XML serializer
uses, it's a couple of lines of code anyway.
> Serialisers can be set up in different ways, so I thought it would be good
> to allow the SItemap author to be able to tell the Transformer to use a
> Serialiser already setup in the SiteMap.

I'm not that sure since your outside behavior is still that of a
transformer if you are taking input and placing output.

The use of Serializers would be justified if you considered the need for
plugging in different serialization behavior, but I only see the need
for the XML serialialize, so my suggestion is to call the serialization
routines directly.
> Hence my need to get a Serialser by it's sitemap name, whilst inside my
> Transformer.
> Does that make any more sense ;)    ?

Yes, but I'd call it FS: if you need to serialize it doesn't necessarely
mean that you need a the whole abstraction of the serializer concept :)
Don't you agree?

Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<>                             Friedrich Nietzsche

To unsubscribe, e-mail:
For additional commands, email:

View raw message