You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gasper <ga...@gorenc.com> on 2000/10/17 20:52:38 UTC
Strange error with dynamic XSL
Hello
I have been following the discusion for the dynamic XSL generation and was
trying to do it. But I have encountered an error with the page compilation.
My XSP code is starting like this:
<xsp:logic>
<![CDATA[
String s=request.getParameter("action");
if ((s==null) || (s.equals("insert"))) {
]]>
<xsp:pi target="xml-stylesheet">href="xsl/html/product.xsl"
type="text/xsl"</xsp:pi>
<xsp:pi target="xml-stylesheet">href="xsl/wml/product.xsl"
type="text/xsl" media="wap"</xsp:pi>
<![CDATA[
} else if (s.equals("edit")) {
]]>
<xsp:pi target="xml-stylesheet">href="xsl/html/productu.xsl"
type="text/xsl"</xsp:pi>
<xsp:pi target="xml-stylesheet">href="xsl/wml/productu.xsl"
type="text/xsl" media="wap"</xsp:pi>
<![CDATA[
} else if (s.equals("add")) {
]]>
<xsp:pi target="xml-stylesheet">href="xsl/html/producti.xsl"
type="text/xsl"</xsp:pi>
<xsp:pi target="xml-stylesheet">href="xsl/wml/producti.xsl"
type="text/xsl" media="wap"</xsp:pi>
<![CDATA[
}
]]>
The error I get is:
java.lang.Exception: XSP Java Compiler: Compilation failed for _product.java
36: Type expected.
if ((s==null) || (s.equals("insert"))) {
^ 1 error
Can someone please tell me what am I doing wrong?
Thanks for your help.
Gasper