Sure. The main pipeline continues but the portion of XML corresponding to the SWT has been replaced by the result of the SWT step. Input: <...> <source:write ....> <content_to_write> <...> </content_to_write> </source:write> <...> Output: <...> <source:result isSuccess='true'/> <...> Note: this is not the correct syntax, at all. But this is the idea :-)
-----Message d'origine----- De: Argyn Kuketayev [mailto:[EMAIL PROTECTED]] Date: vendredi 16 août 2002 16:26 À: '[EMAIL PROTECTED]' Objet: RE: Can cocoon write pdf to a file? isn't there to be a serializer after the transformer in the pipeline? > -----Original Message----- > From: Geoff Howard [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] > Sent: Friday, August 16, 2002 10:22 AM > To: '[EMAIL PROTECTED]' > Subject: RE: Can cocoon write pdf to a file? > > > > > Yes! you want SourceWritingTransformer from Cocoon 2.1 dev. > > > There is a > > > parameter to tell it how to serialize the output. It writes > > > to a file > > > on the local hard drive. > > > > SWT can have its own serializer? What a great stuff! > > Is this feature available in the scratchpad of C2.0.3? > > Yes, just checked and it's in scratchpad of 2.0.3. > From the java docs: > > This transformer allows you to output to a WritableSource. > > Definition: > <map:transformer name="tofile" > src="org.apache.cocoon.transformation.SourceWritingTransformer"> > <map:parameter name="serializer" value="xml"/> > <!-- this is the default Serializer (if your Source needs > one, like for > instance FileSource ) --> > </map:transformer/> > > Invocation: > > <map:transform type="tofile"> > <map:parameter name="serializer" value="xml"/> > </map:transform> > > Input XML document example: > > <page xmlns:source=" http://apache.org/cocoon/source/1.0 <http://apache.org/cocoon/source/1.0> "> > ... > <source:write src="context://doc/editable/my.xml"> > <page> > XML Object body > </page> > </source:write> > ... > </page> > > Output XML document example: > > <page xmlns:source=" http://apache.org/cocoon/source/1.0 <http://apache.org/cocoon/source/1.0> "> > ... > <source:write > src="/source/specific/path/to/context/doc/editable/my.xml" > result="success|failure" action="new"> > source specific error message > </source:write> > ... > </page> > > Geoff > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. < http://xml.apache.org/cocoon/faq/index.html <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]>