You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Goetz Botterweck <bo...@uni-koblenz.de> on 2003/04/01 11:40:08 UTC

unable to serialize XHTML in ISO encoding

WHAT I WANT
    serialize XHTML in ISO-8859-1 encoding

PROBLEM
    Even if I tell the serializer to use ISO-8859-1 encoding, it keeps generating UTF-8 encoding

WHAT I DID

1) Sitemap: Configured a XHTML serializer
    <map:serializer logger="sitemap.serializer.xhtml" mime-type="text/html"
    name="xhtml"
    pool-grow="2" pool-max="64" pool-min="2"
    src="org.apache.cocoon.serialization.XMLSerializer">
        <doctype-public>-//W3C//DTD XHTML 1.0 Transitional//EN</doctype-public>
        <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</doctype-system>
        <encoding>ISO-8859-1</encoding>
   </map:serializer>

2) Sitemap: Configured the processing steps to use the XHTML serializer
        <map:match pattern="ccs/**.html">
            <map:generate src="docs/ccs/{1}.xml"/>
            <map:transform src="docs/ccs/stylesheets/article2html.xsl"/>
            <map:serialize type="xhtml"/>
        </map:match>

3) In the related XSL-stylesheet I explicitly requested
     <xsl:output method="xml" encoding="iso-8859-1"/>

RESULT
    Cocoon keeps generating UTF-8 output which starts like this
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
     ...
    </html>

Any suggestions?