You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Marko NIINIMAKI <ma...@mail.cern.ch> on 2002/11/29 16:17:22 UTC
util:include-file fails to include in .xsp
Hello,
I'm trying to include a <xsp:logic>-block from another file.
The application works _without_ the include as follows:
<?xml version="1.0"?>
<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:session="http://apache.org/xsp/session/2.0"
xmlns:xsp-request="http://apache.org/xsp/request/2.0"
xmlns:util="http://www.apache.org/1999/XSP/Util"
>
<xsp:structure>
<xsp:include>java.util.*</xsp:include>
..
</xsp:structure>
<!--INCLUDE STARTS HERE-->
<![CDATA[
public String outputboo() { return "boo"; }
]]>
</xsp:logic>
<!--INCLUDE FINISHES HERE-->
<page>
<title>GB default page</title>
<content>
<xsp:logic>
<![CDATA[
System.out.println(outputboo());
]]>
</xsp:logic>
</content>
</page>
</xsp:page>
However, if I replace
<!--INCLUDE STARTS
..FINISHES HERE-->
with
<util:include-file name="boo.xsp"/>
where boo.xsp is
<xsp:logic>
<![CDATA[
public String outputboo() { return "boo"; }
]]>
</xsp:logic>
I get no output. Is there some trick?
This is cocoon-2.0.3 with tomcat-4.1.10
Yours,
Marko
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
util:include-file still fails to include in .xsp
Posted by Marko NIINIMAKI <ma...@mail.cern.ch>.
Hmm, I have a feeling this is a bug in cocoon utils:
<?xml version="1.0"?>
<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:session="http://apache.org/xsp/session/2.0"
xmlns:xsp-request="http://apache.org/xsp/request/2.0"
xmlns:util="http://apache.org/xsp/util"
>
<page>
<title>
<util:get-file-content name="foo.txt"/>
</title>
</page>
</xsp:page>
(foo.txt contains hello)
this compiles but the title tags are empty in parsed output.
This is cocoon 2.0.3. Could someone plase try if it works
with some other versions.
Yours,
Marko
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>