hi Any

first try do set disable-output-escape="yes"
in your xsl files

..
<xsl:value-of select="@title" disable-output-escaping="yes"/>
..


then set UTF-8 as default encoding in your serializers (xml, html)

    <map:serializer logger="sitemap.serializer.html" mime-type="text/html" 
name="html" pool-grow="4" pool-max="32" pool-min="4" 
src="org.apache.cocoon.serialization.HTMLSerializer">
      <doctype-public>-//W3C//DTD HTML 4.01 Transitional//EN</doctype-public>   
   
<doctype-system>http://www.w3.org/TR/html4/loose.dtd</doctype-system>
      <encoding>utf-8</encoding>
    </map:serializer>

in sitemap.xmap

this is the only way i have found to get non escaped content for greek 
characters

hope tha this help

--stavros

 
On Fri, 11 Feb 2005, 
Any Trifonova wrote:

>   Hello,
>  
> I have problem with non-english characters...
> I'm doing transformation of XML to HTML
> I need to have as a final result in the HTML strings of this kind:
> φsterreichischen
> instead i get string of this kind
> &ouml;sterreichischen
> which is not desired
>  
> I guess it is some sort of character encoding mismatch. Please someone let
> me know what should be done...
>  
> Here are the details... I'm sending you only the relevant parts.
> I'm using cocoon over a tomcat server in windows environment.
> I have XML files that contain something like this:
>  
>   <body id="de.ab.general.001.body">
>     <p id="de.ab.general.001.body.p000">
>       <s id="de.ab.general.001.body.p000.s000">
>         <w base="φsterreichisch" lexref="de.g.staaten.1" ctag="ADJA" id="de
> ab.general.001.body.p000.s000.w003">φsterreichischen</w>
>         ...
>       </s>
>     </p>
>   </body>
>  
>  Afterwards I'm using an XSL to transform this XML into HTML (word.xsl):
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1
> 0">
> <xsl:output method="html" indent="yes"/>
> <xsl:output encoding="ISO-8859-1"/>
> <xsl:preserve-space elements="*"/>
>  
> <xsl:template match="text">
>  <HTML>
>   <HEAD>
>    <META HTTP-EQUIV="Content-Type" CONTENT="text/html"/>
>    <TITLE>
>  ...
>  
> <xsl:template match="w">
>  <xsl:variable name="wordValue" select="." />
>  <xsl:variable name="wordtype" select="@lexref" />
> ...
> <a>
>     <xsl:attribute name="href"><xsl:value-of select=$wordtype
> /></xsl:attribute>
>     <xsl:value-of select="$wordValue"/>
> </a>
>  
> In the sitemap I have the following:
>      <map:serializer name="html" mime-type="text/html;charset=ISO-8859-1"
>                 src="org.apache.cocoon.serialization.HTMLSerializer">
>       <doctype-public>-//W3C//DTD HTML 4.01
> Transitional//EN</doctype-public>
>          <doctype-system>http://www.w3.org/TR/html4/loose
> dtd</doctype-system>
>       <encoding>ISO-8859-1</encoding>
>      </map:serializer>
>  
>             <map:match pattern="*.lemma">
>                 <map:generate src="{1}.xml"/>
>                 <map:transform src="word.xsl"/>
>                 <map:serialize type="html"/>
>             </map:match>
>  
> Thank you in advance!
> Anna


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to