cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Milvich <protu...@gmx.de>
Subject FOR-loop in xsp:logic section
Date Mon, 16 May 2005 09:03:07 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<div class="moz-text-flowed"
 style="font-family: -moz-fixed; font-size: 13px;" lang="x-western">Hallo,
<br>
<br>
i am using Cocoon 2.1.7, jdk 1.4 and tomcat 5.0.19.
<br>
<br>
I would like to include in a xsp-page a small logic part and in this
logic section a FOR loop.
<br>
Everything works fine, only the FOR loop doesn't work. Here is my
simple code:
<br>
<br>
&lt;?xml version="1.0" encoding="iso-8859-1"?&gt;
<br>
&lt;xsp:page language="java" xmlns:xsp=<a class="moz-txt-link-rfc2396E"
 href="http://apache.org/xsp">"http://apache.org/xsp"</a>
<br>
&nbsp;&nbsp; xmlns:xsp-request=<a class="moz-txt-link-rfc2396E"
 href="http://apache.org/xsp/request/2.0">"http://apache.org/xsp/request/2.0"</a>
<br>
&nbsp;&nbsp; xmlns:xsp-session=<a class="moz-txt-link-rfc2396E"
 href="http://apache.org/xsp/session/2.0">"http://apache.org/xsp/session/2.0"</a>
<br>
&nbsp;&nbsp; xmlns:esql=<a class="moz-txt-link-rfc2396E"
 href="http://apache.org/cocoon/SQL/v2">"http://apache.org/cocoon/SQL/v2"</a>
<br>
&nbsp;&nbsp; create-session="true"&gt;
<br>
&nbsp;&nbsp; &lt;xsp:structure&gt;
<br>
&nbsp;&nbsp; &lt;/xsp:structure&gt;
<br>
&nbsp;&nbsp; &lt;xsp:logic&gt;
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
for (int i=0;i&amp;lt; 9; i++){
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
i=i+1;
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}
<br>
&nbsp;&nbsp; &lt;/xsp:logic&gt;
<br>
&lt;/xsp:page&gt;
<br>
<br>
I get the following error when calling the xsp-page:
<br>
<br>
<blockquote type="cite">Error compiling getStatement_xsp: ERROR 1
(org\apache\cocoon\www\apples\xsp\getStatement_xsp.java): ...
XSPObjectHelper.xspExpr(contentHandler, obj); ; } // start error (lines
237-237) "Syntax error on token "}", { expected after this token" } //
end error for (int i=0;i&lt; 9; i++) i=i+1; ... ERROR 2
(org\apache\cocoon\www\apples\xsp\getStatement_xsp.java): ... ; } } //
start error (lines 239-239) "Syntax error on token(s), misplaced
construct(s)" for (int i=0;i&lt; 9; i++) // end error i=i+1; /** ...
Line 237, column 0: Syntax error on token "}", { expected after this
token Line 239, column 0: Syntax error on token(s), misplaced
construct(s)
  <br>
</blockquote>
<br>
<br>
My question is. How can I include a FOR or a WHILE loop in the
xsp:logic section?
<br>
<br>
Thanks for help in advance
<br>
<br>
Michael Milvich
<br>
<br>
</div>
</body>
</html>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message