Sorry for being long, I'm just beginning my day.
( 09:40 AM in France :)
I have simply replaced "FileWritingTransformer" with
"SourceWritingTransformer" in the sitemap :
1. <map:transformer name="tofile"
logger="sitemap.transformer.tofile"
src="org.apache.cocoon.transformation.SourceWritingTransformer">
<map:parameter name="serializer" value="xml"/>
</map:transformer>
2. <map:match pattern="project/test-write">
<map:generate src="test/test-write.xml"/>
<map:transform type="tofile"/>
<map:serialize type="xml"/>
</map:match>
3. Inside test-write.xml :
<?xml version="1.0" encoding="iso-8859-1"?>
<product xmlns:source="http://apache.org/cocoon/source/1.0">
<functionBlockList>
<functionBlock>...</functionBlock>
<source:write src="test/result-write.xml">
<functionBlock> content </functionBlock>
</source:write>
<functionBlock>...</functionBlock>
<functionBlock>...</functionBlock>
</functionBlockList>
</product>
This used to work with FileWritingTransformer.
Here is my XML serializer declaration :
<map:serializer name="xml" mime-type="text/xml"
logger="sitemap.serializer.xml"
src="org.apache.cocoon.serialization.XMLSerializer"
pool-max="32" pool-min="16" pool-grow="4">
<encoding>iso-8859-1</encoding>
</map:serializer>
Thanks,
Matthieu
> -----Message d'origine-----
> De : Jeremy Quinn [mailto:[EMAIL PROTECTED]]
> Envoy� : mardi 26 mars 2002 18:43
> Objet : Re: SourceWritingTransformer : Cannot get 'xml' serializer
>
>
> At 6:18 pm +0100 26/3/02, Matthieu Ben�teau wrote:
> >Hi,
> >
> >I've just installed Cocoon 2.0.2 on Tomcat 4.0.1, and it works
> perfectly :).
> >But I've encountered a problem using the scratchpad's
> >SourceWritingTransformer.
> >
> >I used to use revision 1.6 of the old FileWritingTransformer.
> >I've just changed "xfwt" into "source" and tested it, and I've
> received the
> >following error :
> >
> > action : none
> > result : failed
> > error message : "could not get a ContentHandler and failed to cancel"
>
> May I see the setup you used?
>
> 1. Declaration of SourceWritingTransformer in the SiteMap
> 2. Usage of the SourceWritingTransformer in the SiteMap
> 3. The actual tag you generate to trigger SourceWritingTransformer
>
> >Here are the 2 exceptions of the sitemap.log :
> >
> >WARN (2002-03-26) 17:40.48:760
> >[sitemap.transformer.tofile](/myproject/request)
> >HttpProcessor[8080][0]/SourceWritingTransformer: failed, could not get a
> >ContentHandler
> >org.apache.cocoon.ProcessingException: Cannot get 'xml' serializer
>
> Do you have a serializer set up called 'xml', maybe you removed
> the default
> from the main sitemap?
>
>
> >Thanks in advance,
> >Matthieu
>
> Thanks for trying this out.
>
> regards Jeremy
> --
> ___________________________________________________________________
>
> Jeremy Quinn Karma Divers
> webSpace Design
> HyperMedia Research Centre
>
> <mailto:[EMAIL PROTECTED]>
<http://www.media.demon.co.uk>
<phone:+44.[0].20.7737.6831> <pager:[EMAIL PROTECTED]>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.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/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>