cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zheng jianjun <jianjun_zheng2...@yahoo.com.cn>
Subject Testing generator encoding problem
Date Fri, 13 Feb 2004 16:39:50 GMT
Hi ,
 
When testing cocoon 2.1.3 , I had the following  problem . It's OK when read-in the static
XML file pages/16.xml in codepage "gb2312" by generator "file" , but not work by the testing
generator "test", which actually call Linux command "cat  /...../pages/16.xml" , the html
did
generated in IE , but no Chinese shown. Any advise , please ?
 
OS : Redhat 8.0 , locale="en_US.iso88591"
JDK 1.4.2_02-b03
Cocoon 2.1.3
 
web.xml :
....
    <init-param>
      <param-name>container-encoding</param-name>
      <param-value>iso-8859-1</param-value>
    </init-param>
          
    <init-param>
      <param-name>form-encoding</param-name>
      <param-value>iso-8859-1</param-value>
    </init-param>
....
 
sitemap.xmap :
 
<!-- the testing generator , it is call "cat /..../pages/16.xml" , then feeds it to the
pipe -->
 
 <map:pipeline>
 <map:match pattern="result/*.test">
 <map:generate type="test"/>
 <map:transform src="stylesheets/report.xsl"/>
 <map:serialize type="html"/>
 </map:match>
 </map:pipeline>
 
 <map:pipeline>
 <map:match pattern="result/*.html">
 <map:generate src="pages/{1}.xml"/>
 <map:transform src="stylesheets/report.xsl"/>
 <map:serialize type="html"/>
 </map:match>
 </map:pipeline>

My static 16.xml is something like:
 
<?xml version="1.0" encoding="GB2312"?>
<report>
    <header>
       <title>
          40.13 生产效率统计日报表(B)
       </title>
       <user>
           MFG
       </user>
       <time>
          01/13/04 13:04:13
       </time>
    </header>
.....
</report>
 
report.xsl is something as the following:
 
<?xml version="1.0"?> 
<!DOCTYPE stylesheet [
<!ENTITY nbsp "&#x00A0;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" 
            version="4.01" 
     doctype-public="-//W3C//DTD HTML 4.01//EN" 
     doctype-system="http://www.w3.org/TR/html4/strict.dtd"
     encoding="gb2312" 
     indent="yes"/>
<xsl:template match="report">
    <html>
        <head><title>WIP Reports</title></head>
.....

It's OK to input URL  http://localhost:8080/cocoon/result/16.html in IE ,
but http://localhost:8080/cocoon/result/test.test won't work .
 
Thanks in advance.
Jianjun Zheng.



---------------------------------
Do You Yahoo!?
完全免费的雅虎电邮,马上注册获赠额外60兆网络存储空间
Mime
View raw message