You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Yuji KATO <ka...@jri.co.jp> on 2001/06/02 06:03:28 UTC
Problem of template-applying
Dear All,
Hello. How do you do?
I have a problem of template-applying of XSL by Cocoon 1.8.2.
I got the the result1 below using XSL1 but the result2 using XSL2.
My expectation on XSL2 is something like this:
<html a="b"><cntntforcp><input-text-page>...
...</cntntforcp></input-text-page></html>
What am I doing wrong?
Sorry for the length.
Thank you for help.
++++++++++++++++++++
Yuji KATO
kato.yuji@jri.co.jp
** XSL1 *******************************************************
<xsl:template match="/">
<xsl:processing-instruction name="cocoon-format">
type="text/html/imode"
</xsl:processing-instruction>
<html a="b">
<xsl:apply-templates select="document/content" />
</html>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
***************************************************************
** result1 (As it is) *****************************************
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/WD-html-in-xml/DTD/xhtml1-strict.dtd">
<html a="b"><content>
<cntntforcp><input-text-page><title>THETITLE</title><action>actionaction</action></input-text-page></cntntforcp>
</content></html>
<!-- This page was served in 57 milliseconds by Cocoon 1.8.2 -->
***************************************************************
** XSL2 *******************************************************
<xsl:template match="/">
<xsl:processing-instruction name="cocoon-format">
type="text/html/imode"
</xsl:processing-instruction>
<html a="b">
<xsl:apply-templates select="document/content/cntntforcp" />
</html>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
***************************************************************
** result2 ***************************************************
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/WD-html-in-xml/DTD/xhtml1-strict.dtd">
<html a="b"></html>
<!-- This page was served in 43 milliseconds by Cocoon 1.8.2 -->
***************************************************************
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Problem of template-applying
Posted by Yuji KATO <ka...@jri.co.jp>.
On Sat, 02 Jun 2001 13:03:28 +0900
Yuji KATO <ka...@jri.co.jp> wrote:
> I have a problem of template-applying of XSL by Cocoon 1.8.2.
>
> I got the the result1 below using XSL1 but the result2 using XSL2.
> My expectation on XSL2 is something like this:
> <html a="b"><cntntforcp><input-text-page>...
> ...</cntntforcp></input-text-page></html>
The tags above are wrong. The right ones are the following:
<html a="b"><cntntforcp><input-text-page>...
...</input-text-page></cntntforcp></html>
Thank you for help.
++++++++++++++++++++
Yuji KATO
kato.yuji@jri.co.jp
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>