cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lionel Crine <cr...@4dconcept.fr>
Subject encoding problem and xsp
Date Tue, 25 Mar 2003 11:30:08 GMT
Hello,

I'm having trouble with my xsp page and ISO-8859-1 encoding. I use 
cocoon-2.0.4.

I have an xsp which get the request object of a form and create again a 
link for an xsl page which redirect all to frame.
All generators, transfomers and serializer have to <encoding> parameter.

the sitemap :

         <!-- frame page -->
         <map:match pattern="frame">
           <map:generate type="serverpages" src="proto/xsp/frame.xsp"/> 
-->create a link from request parameters
           <map:transform type="xslt" src="proto/xsl/frame.xsl"/> --> 
redirection to three pages (via frames).
           <map:serialize type="html"/>
         </map:match>


frame.xsl :

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output encoding="ISO-8859-1"/>

<xsl:template match="page">
   <html>
    <head>
       <link rel="stylesheet" type="text/css" href="style.css"/>
    </head>
    <frameset rows="120,*" cols="*" frameborder="1" border="1" 
framespacing="0">
    <!-- top frame -->
      <frame name="top" marginwidth="0" marginheight="0" 
scrolling="NO"><xsl:attribute name="src"><xsl:value-of 
select="content/link/top"/></xsl:attribute></frame>
      <frameset cols="512,*" rows="*" frameborder="1" border="1" 
framespacing="0">
         <!-- left frame -->
         <frame name="search" marginwidth="0" 
marginheight="0"><xsl:attribute name="src"><xsl:value-of 
select="content/link/left"/></xsl:attribute></frame> --> this frame the
the 
link
         <!-- right frame -->
         <frame name="empty" marginwidth="0" 
marginheight="0"><xsl:attribute name="src"><xsl:value-of 
select="content/link/right"/></xsl:attribute></frame>
         </frameset>
    </frameset>
<noframes>
    <body/>
</noframes>
   </html>
</xsl:template>
</xsl:stylesheet>


I also put a piece of frame.xsp :

<?xml version="1.0" encoding="ISO-8859-1"?>
...
   <content>
     <title>Prototype RLR</title>
         <link>
           <top>top</top>
           <right>empty</right>
           <left>search?<xsp:logic>for(int i=0;i &lt; 
values.size();i++){</xsp:logic><xsp:expr>(String)tempVector.elementAt(i)</xsp:expr>=<xsp:expr>(String)values.elementAt(i)</xsp:expr><xsp:logic>if(i

&lt; values.size()-1){</xsp:logic>&amp;<xsp:logic>}}</xsp:logic></left>
         </link>
   </content>


When the sitemap is called the accentuated characters are not well displayed.
I tried different things.

1/ the "search"(in left tag) page is a request generator which display :

...
<requestParameters>
  <parameter name="Contenu Texte_wordindex">
   <value>école</value> --> I should see "école" (without quote)
   </parameter>
...


2/Furthermore I tried :

<!-- frame page -->
         <map:match pattern="frame">
           <map:generate type="serverpages" src="proto/xsp/frame.xsp"/> 
-->create a link from request parameters
           <map:serialize type="xmltext"/>
         </map:match>

This send an answer with good characters (é, â, etc, are well displayed).


Any clue ?

Lionel
   


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


Mime
View raw message