cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <>
Subject Re: Writing a Transformer, getting a Serializer
Date Tue, 04 Dec 2001 19:40:58 GMT
At 10:25 am +0100 4/12/01, Stefano Mazzocchi wrote:
>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?

Thanks for the reply.

Makes sense, I'll try it like you suggest.

People may still want to set character-set and indentation of the serialsed
XML, or is the character-set treated transparently?

In fact I don't really understand the issues of Character Sets here, can
anybody help?

Assuming that you do not want to change the character-set of a document
that you are inserting Nodes into, and it might be anything, and you don't
know what character-set the Request is going to be, what do you do?

This is something I never worked out properly in the FP TagLib, and it
caused problems for people not using utf-8, I'd rather get it right this
time ;)

Thanks for your help

regards Jeremy


   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <>     		 <>
   <phone:+44.[0].20.7737.6831>             <>

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

View raw message