Serializer that writes to file

2002-07-10 Thread Gerardo_Flores

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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: SourceWritingTransformer sample (disregard previous post Serializer that writes to file)

2002-07-10 Thread Hunsberger, Peter

 Also, what if I don't want the final output sent over the wire.how
 would I stop output from going to the requesting browser?  

Writing a null (do nothing) serializer would be pretty easy... :-)

-
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: Serializer that writes to file

2002-07-10 Thread Andrew C. Oliver

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

[EMAIL PROTECTED] 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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]


  





-
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]