cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Reinhard Haller" <reinhard.hal...@interactive-net.de>
Subject [2.1.9] sourcewriting transformer/serializer strange behaviour
Date Thu, 13 Apr 2006 13:44:22 GMT
Hi,

by upgrading from 2.1.7 to 2.1.9 I've found strange effects regarding
serializing with the sourcewriting transformer.

The relevant parts of the sitemap:

...
   <map:transformer name="write-source-utf-8" 
           
src="org.apache.cocoon.transformation.SourceWritingTransformer">
      <map:parameter name="serializer" value="xml-utf-8"/>  
   </map:transformer>
</map:transformers>

<map:serializers>
   <map:serializer logger="sitemap.serializer.xml" 
          mime-type="text/xml; charset=utf-8" 
          name="xml-utf-8" 
          src="org.apache.cocoon.serialization.XMLSerializer">
      <encoding>utf-8</encoding>
      <indent>yes</indent>
   </map:serializer> 
</map:serializers>
...
   <map:transform src="xslt/rssstore.xslt" label="debug8" >
      <map:parameter name="path" value="news" />
   </map:transform>
   <map:transform type="write-source" label="debug9" >
      <map:parameter name="serializer" value="xml-utf-8"/>
   </map:transform>
   <map:serialize type="xml-utf-8"/>
</map:match>

Using the above I receive the following message from the transform:

<sourceResult xmlns:source="http://apache.org/cocoon/source/1.0">
	<execution>failed</execution>
	<message>There was a problem looking up a component:
org.apache.avalon.framework.service.ServiceException: serializers:
ComponentSelector could not find the component for hint [xml-utf-8] (key
[xml-utf-8])
(Key='org.apache.cocoon.serialization.SerializerSelector/xml-utf-8')</message>
	<behaviour>write</behaviour>
	<action>none</action>
	<source>file:/N:/web/cocoon-2.1.9/build/webapp/xmlweb2/news/2006-04-13T1525541.item</source>
	<serializer>xml-utf-8</serializer>
</sourceResult>

Changing the transform type from write-source to write-source-utf-8
gives the correct result, i.e.
the output is written with the utf-8 encoding.

Using the write-source-utf-8 transformer without the parameter
(name=serializer ...) ends up
with the output written with iso-8859-1 encoding.

btw. the result of the pipeline (the sourcewriting result xml) is
always written with iso-8859-1 encoding.

Any suggestions?

Thanks
Reinhard




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


Mime
View raw message