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>
<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=""/>
<map:serialize type="html"/>
</map:match>
</map:pipeline>
<map:match pattern="result/*.test">
<map:generate type="test"/>
<map:transform src=""/>
<map:serialize type="html"/>
</map:match>
</map:pipeline>
<map:pipeline>
<map:match pattern="result/*.html">
<map:generate src=""/>
<map:transform src=""/>
<map:serialize type="html"/>
</map:match>
</map:pipeline>
<map:match pattern="result/*.html">
<map:generate src=""/>
<map:transform src=""/>
<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>
<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 " ">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!DOCTYPE stylesheet [
<!ENTITY nbsp " ">
]>
<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"/>
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>
.....
<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兆网络存储空间