"Nathaniel Alfred" <[EMAIL PROTECTED]> wrote on 05/02/2005 03:13:37 PM:
> >-----Original Message----- > >From: Leona Slepetis [mailto:[EMAIL PROTECTED] > > Try the following: > > >I would like: (what is the type of myVar?) > >... > String myVar; > ><esql:execute-query> > > <esql:query> > > select text > > from sur_response > > </esql:query> > > <esql:results> > > <esql:row-results> > > <xsp:logic> > > myVar = <esql:get-xml column="text"/>; > myVar = <esql:get-string column="text"/>; > > </xsp:logic> > > </esql:row-results> > > </esql:results> > ></esql:execute-query> > ><TABLE> > > <TR> > > <TD><xsp:expr>myVar</xsp:expr></TD> > <TD><util:include-expr xmlns:util="http://apache.org/xsp/util/2.0 > " expr="myVar"/></TD> > > </TR> > > <TR> ... some other queries go here ... </TR> > > <TR> > > <TD><xsp:expr>myVar</xsp:expr></TD> > > </TR> > ></TABLE> > >... > > > >Thanks, > >Leona > > HTH, Alfred. > Alfred, Thanks. That was part of the solution; I had to solve an additional problem to get it working. My new code has: <!-- in the root element --> xmlns:util="http://apache.org/xsp/util/2.0" <!-- in the query --> <esql:row-results> <xsp:logic> strWelcomeText = <esql:get-string column="welcome_text"/>; </xsp:logic> </esql:row-results> <!-- in each place where I want the output --> <util:include-expr> <util:expr><xsp:logic>"<at>"+strWelcomeText+"</at>"</xsp:logic></util:expr> </util:include-expr> You will notice that I am wrapping my String with "<at>". It doesn't matter what this tag is, it just helps make the output be well-formed. Without the enclosing tag, I would get "SAXParseException: Content is not allowed in prolog." Regards, Leona --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
