You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tom Place <ps...@nottingham.ac.uk> on 2002/11/26 12:58:21 UTC
XSP and ESQL
Hi all,
I was wondering if anyone could help me with the following. I am trying
to put the results from a row of results directly into String variables
as show below and Cocoon isnt happy. I get a unclosed character literal
compilation error.
The XSP I am executing is as follows
while (class1 = null) {
<esql:connection>
<esql:pool>autorevs_pool</esql:pool>
<esql:execute-query>
<esql:query>select * from profile where SELECTION =
'<xsp:expr>currentSelection</xsp:expr>'</esql:query>
<esql:max-rows>1</esql:max-rows>
<esql:results>
<esql:row-results>
<xsp:logic>
class1 = "<esql:get-string column="CLASS"/>";
engine1 = "<esql:get-string column="ENGINE_TYPE"/>";
<title><xsp:expr>class1</xsp:expr></title>
<heading><xsp:expr>engine1</xsp:expr></heading>
</xsp:logic>
</esql:row-results>
</esql:results>
<esql:no-results>
<xsp:logic>
if (currentSelection.equals("Strongly Agree")) {
currentSelection = "Agree";
} else if (currentSelection.equals("Agree")) {
currentSelection = "Undecided";
} else if (currentSelection.equals("Undecided")) {
currentSelection = "Disagree";
} else {
currentSelection = null;
class1 = "error";
}
</xsp:logic>
</esql:no-results>
</esql:execute-query>
</esql:connection>
}
Any help greatly appreciated
Thanks
Tom Place
---------------------------------------------------------------------
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>