cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew C. Oliver" <acoli...@apache.org>
Subject Re: Serializer that writes to file
Date Wed, 10 Jul 2002 16:25:31 GMT
Someone correct me if I' m wrong but...

At the moment, I think you'll have to write an "Action" for this.  AFAIK 
Serializers are currently tied to the
response output stream.  Personally, I think that cocoon should 
ultimately seperate the location concern and
allow multiple serializers in a pipeline.  (the rationale being that 
you'll need to display something as well).

However, one could conceptualize this instead as a transformer (although 
its dirty):

my input---->transformer (writes to file) ------> different output 
displayed to "user"

But I don't like that very much.

Perhaps this isn't a serializer at all, perhaps its some other widget 
that uses a serializer, is passed a "location" (file in this case), and
provides status (which returns responsibility to the sitemap). 
 Questions remain for instance on whether it consumes the SAX events 
passed to it, etc.

But the short answer is " I don't think this is the appropriate place, 
at the moment, to use a serializer"

-Andy
                   

Gerardo_Flores@mckinsey.com wrote:

>I want to write a serializer that will write some content to a file, but
>the filename will have to be passed in as a parameter.  I am having trouble
>getting started.  I know that you cannot pass in a parameter to a
>serializer, but I don't know of another way to do it.  I have looked
>through some of the different serializer source code and am still having
>trouble.  Could anyone offer up a suggestion?  I have looked around for
>some sort of a serializer writing how-to, but no luck.  Would it be best to
>just have either an xsp or transformer somehow just enter in the filename
>into the content?  That seems kind of a hack, but hey if it works, it works
>:)  If this would be a good way, then how could a write a serializer that
>extracts this filename from the content when it is serializing?  Any
>general help on how to write a serializer would be of great help too.
>
>Thanks in advance,
>
>Gerardo
>
>+---------------------------------------------------------+
>This message may contain confidential and/or privileged
>information.  If you are not the addressee or authorized to
>receive this for the addressee, you must not use, copy,
>disclose or take any action based on this message or any
>information herein.  If you have received this message in
>error, please advise the sender immediately by reply e-mail
>and delete this message.  Thank you for your cooperation.
>+---------------------------------------------------------+
>
>
>---------------------------------------------------------------------
>Please check that your question  has not already been answered in the
>FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
>To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
>For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
>
>
>  
>




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message