You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Alten, Jelle Paul (sds-sp)" <je...@ordina.nl> on 2003/11/06 17:50:23 UTC

RE: [HELP]: How to set xml encoding for SourceWritingTransformer -

 
Sorry,
I don't know enough about the SourceWritingTransformer to tell you how
to set the encoding for the SourceWritingTransformer.
 
Anybody else?
 
 
 
 -----Oorspronkelijk bericht-----
Van: Gianluca Morello [mailto:morello@S1.my-tv.it]
Verzonden: donderdag 6 november 2003 18:07
Aan: users@cocoon.apache.org
Onderwerp: Re: [HELP]: How to set xml encoding? SourceWritingTransformer



Hallo Jelle,
 
My serializers map is like this:
 
 <map:serializers default="html">
    <map:serializer name="xml-iso" mime-type="text/xml"
src="org.apache.cocoon.serialization.XMLSerializer">
                <encoding>ISO-8859-1</encoding>
    </map:serializer>
  </map:serializers>
 
And using the following pipeline the xml output encoding is correct!
 
<map:generate src="input.xml"/>
 <map:transform src="simple.xsl"/>
 <map:serialize type="xml-iso"/>

Thank you for your help.
 
 
 
I still have problems with encoding because i have to write xml to file
system:
I'm using SourceWritingTransformer and my real pipeline is like the
following:
 
<map:generate src="input.xml"/>
 <map:transform src="simple.xsl"/>
 <map:transform type="tofile"/>
 <map:serialize type="xml-iso"/>
 
 
My transformers map is:
 
<map:transformer     name="tofile"
src="org.apache.cocoon.transformation.SourceWritingTransformer">
        <!-- 'xml' is the default Serializer (if your Source needs one,
like for instance FileSource) -->
        <map:parameter name="serializer" value="xml-iso"/>
</map:transformer>
 
 
The output files continue to have the encoding set to utf-8
 
Any idea?
 
Thank you
 
Gianluca
 
----- Original Message ----- 

From: Alten, Jelle Paul (sds-sp) <ma...@ordina.nl>  
To: 'users@cocoon.apache.org' <mailto:'users@cocoon.apache.org'>  
Sent: Thursday, November 06, 2003 5:07 PM
Subject: RE: [HELP]: How to set xml encoding?

Sorry, al little too quick perhaps. You should also define the encoding
in the components section, for example:
 
        <map:serializers default="html" label="result">
            <map:serializer name="xml" mime-type="text/xml"
src="org.apache.cocoon.serialization.XMLSerializer">
                <encoding>UTF-8</encoding>
            </map:serializer>
            <map:serializer name="html" mime-type="text/html"
src="org.apache.cocoon.serialization.HTMLSerializer">
                <encoding>ISO-8859-1</encoding>
            </map:serializer>
        </map:serializers>

 

-----Oorspronkelijk bericht-----
Van: Alten, Jelle Paul (sds-sp) [mailto:jelle.paul.alten@ordina.nl]
Verzonden: donderdag 6 november 2003 17:03
Aan: 'users@cocoon.apache.org'
Onderwerp: RE: [HELP]: How to set xml encoding?


use 
    <serialize type="xml" />
 
Jelle

-----Oorspronkelijk bericht-----
Van: Gianluca Morello [mailto:morello@S1.my-tv.it]
Verzonden: donderdag 6 november 2003 17:21
Aan: users@cocoon.apache.org
Onderwerp: [HELP]: How to set xml encoding?


Hallo,
 
i need to set correctly the encoding of my xml output files in
apipeline.
 
For example:
 
if I use a simple pipeline like this
 
 <map:generate src="input.xml"/>
 <map:transform src="simple.xsl"/>
 <map:serialize/>

The xml encoding in the input.xml is ISO-8859-1,
The xml encoding of the simple.xsl s ISO-8859-1,
The simple.xsl file contains a line like this<xsl:output method="xml"
version="1.0" encoding="ISO-8859-1" />
 
The output xml has always the encoding UTF-8.
 
Any idea?
 
Thank you
 
 
Gianluca Morello