You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by 谭中意/eNet/技术服务事业部/产品技术部/产品经理 <zy...@enet.com.cn> on 2001/08/27 10:39:00 UTC

help me with cocoon2 upgrade from cocoon1?

I have used cocoon1.8.2 for several months.
and now I am interested in cocoon2, 
I want to update to cocoon2.

but there are some problems.

1. in my cocoon1 , I have many xml files under /article/200108/ directory,
   and the xml files using /style/article.xsl .

   /style/article.xsl (Because the xml files have one tag as template)
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.
0">
	<xsl:param name="style"/>
	<xsl:template match="/">
		<xsl:choose>
		<!-- when style is specified -->
		<xsl:when test="$style">
		<xsl:processing-instruction name="xml-stylesheet">
			href="/style/<xsl:value-of select="$style"/>"
type="text/xsl"
		</xsl:processing-instruction>
		<xsl:processing-instruction name="cocoon-process">
			type="xslt"
		</xsl:processing-instruction>
		</xsl:when>
		<!-- Otherwise use default.xsl -->
		<xsl:otherwise>
		<xsl:variable name="defaulttemplate">
			<xsl:value-of select="//template"></xsl:value-of>
		</xsl:variable>
		<xsl:processing-instruction name="xml-stylesheet">
			href="<xsl:value-of
select="//template"></xsl:value-of>" 
			type="text/xsl"
		</xsl:processing-instruction>
		<xsl:processing-instruction name="cocoon-process">
			type="xslt"
		</xsl:processing-instruction>
		</xsl:otherwise>
		</xsl:choose>
	<xsl:apply-templates/>
	</xsl:template>

	<!-- copy all elements -->
	<xsl:template match="@*|*|text">
	<xsl:copy-of select="."/>
	</xsl:template>
</xsl:stylesheet>

I want to know if i put all these xml files to cocoon2, how to write
configure files such as xmap?


2.in my xml files, I using GBK encoding
<?xml version="1.0" encoding="GBK"?>

and it seems cocoon2 didnot support GBK encoding?