I use Cocoon 2.0.2 with Tomcat 4.0.1 to generate a html page(exaple.xml) in browser,
but got this excetion:
Description:org.apache.cocoon.ProcessingException: Exception during processing of
file:/C:/unzipped/jj/jj/webapps/cocoon/docs/samples/ex11-01.xml:
java.io.UTFDataFormatException: invalid byte 1 of 1-byte UTF-8 sequence (0xa3)
<!--========================================================================-->
my sitemap snippots:
<map:match pattern="example.xml">
<map:generate src="docs/samples/ex11-01.xml"/>
<map:transform src="stylesheets/ex11-01.xsl"/>
<map:serialize type="html"/>
</map:match>
<!--========================================================================-->
ex11-01.xml:
<?xml version="1.0"?>
<JinHe_Network_Studio>
<Address>http://www.keyhold.com.tw</Address>
<Catalogue>
<book>
<name id="F01001">Look��Cool Flash5 </name>
<price>560</price>
<authors>
<author>Jiang Gaoju</author>
<author>Zeng Qiwen</author>
</authors>
<Recap>Something Words the Recap</Recap>
<pic>F01001.jpg</pic>
</book>
<book>
<name id="D01001">21 Century Network Summary</name>
<price>520</price>
<authors>
<author>ZhiLing Work Group</author>
</authors>
<Recap>Something for the recap</Recap>
<pic>D01001.jpg</pic>
</book>
</Catalogue>
</JinHe_Network_Studio>
<!--========================================================================-->
ex11-01.xsl:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="view-source"/>
<xsl:template match="/">
<!--<xsl:processing-instruction
name="cocoon-format">type="text/html"</xsl:processing-instruction>-->
<HTML>
<BODY>
<xsl:for-each select="JinHe_Network_Studio">
<xsl:apply-templates />
</xsl:for-each>
<TABLE BORDER="1" CELLPADDING="5">
<TR>
<TH>name</TH><TH>price</TH><TH>author</TH><TH>Recap</TH><TH>pic</TH>
</TR>
<xsl:for-each select="//book" order-by="+price">
<TR>
<xsl:apply-templates />
</TR>
</xsl:for-each>
</TABLE>
</BODY>
</HTML>
</xsl:template>
<xsl:template match="//Address">
<FONT size="5">
<A>
<xsl:attribute name="href">
<xsl:value-of/>
</xsl:attribute>
JinHe Address
</A>
</FONT>
</xsl:template>
<xsl:template match="name">
<TD WIDTH="150" STYLE="font-size:18pt; color:#800000;">
<xsl:value-of/>
<br/>
<FONT size="2" color="black">
ID<xsl:value-of select="@id"/>
</FONT>
</TD>
</xsl:template>
<xsl:template match="//price">
<TD STYLE="color:RED;">
<xsl:value-of />
</TD>
</xsl:template>
<xsl:template match="authors">
<TD STYLE="color:BLUE;">
<xsl:apply-templates />
</TD>
</xsl:template>
<xsl:template match="author">
<xsl:value-of/>
<br/>
</xsl:template>
<xsl:template match="Recap">
<TD WIDTH="220" STYLE="font-size:10pt;">
<xsl:value-of/>
</TD>
</xsl:template>
<xsl:template match="pic">
<TD WIDTH="120" HEIGHT="180">
<IMG WIDTH="120" HEIGHT="180">
<xsl:attribute name="SRC">
<xsl:value-of/>
</xsl:attribute>
</IMG>
</TD>
</xsl:template>
</xsl:stylesheet>
<!--========================================================================-->
Any hints?
Thanks
X.Wang
SYS,UEA