You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Christian Parpart <cp...@t-online.de> on 2000/11/14 16:11:18 UTC

XSP and SQL in a well formed .XML: but got an Syntaxerror by SQL

Hi

I wrote a short module (land-data.xml) using XSP and SQL inside.
Cocoon-1.8 always says there is an Syntaxerror! Why?

  <sql:query>
    SELECT Name, Kontinent
      FROM Land 
      WHERE Name='<xsp:expr>request.getParameter("Name")</xsp:expr>';
  </sql:query>

What's wrong? (see attachment)

Regards,
Christian Parpart
mailto:cparpart@surakware.com
http://www.surakware.com (new http://surak.cocoonhsot.com)

Re: XSP and SQL in a well formed .XML: but got an Syntaxerror by SQL

Posted by Matthew Cordes <mc...@maine.edu>.
Nope.  I use the sqltaglib and the query works fine on more than 1 line.
What happens when you don't use cocoon?  e.g. run this stylesheet and 
some test data through an xslt parser via the command line.

-matt

On Tue, Nov 14, 2000 at 05:37:39PM +0000, Ulrich Mayring wrote:
> Christian Parpart wrote:
> > 
> > Hi
> > 
> > I wrote a short module (land-data.xml) using XSP and SQL inside.
> > Cocoon-1.8 always says there is an Syntaxerror! Why?
> > 
> >   <sql:query>
> >     SELECT Name, Kontinent
> >       FROM Land
> >       WHERE Name='<xsp:expr>request.getParameter("Name")</xsp:expr>';
> >   </sql:query>
> > 
> > What's wrong? (see attachment)
> 
> I think you have to write the query all on one line.
> 
> Ulrich
> 
> -- 
> Ulrich Mayring
> DENIC eG, Systementwicklung
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 

Re: XSP and SQL in a well formed .XML: but got an Syntaxerror by SQL

Posted by Ulrich Mayring <ul...@denic.de>.
Ulrich Mayring wrote:
> 
> >   <sql:query>
> >     SELECT Name, Kontinent
> >       FROM Land
> >       WHERE Name='<xsp:expr>request.getParameter("Name")</xsp:expr>';
> >   </sql:query>
> >
> > What's wrong? (see attachment)
> 
> I think you have to write the query all on one line.

BTW, ' and " are not reserved XML characters, only < > and & are.
However, they're all reserved Java characters :-)

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: XSP and SQL in a well formed .XML: but got an Syntaxerror by SQL

Posted by Ulrich Mayring <ul...@denic.de>.
Christian Parpart wrote:
> 
> Hi
> 
> I wrote a short module (land-data.xml) using XSP and SQL inside.
> Cocoon-1.8 always says there is an Syntaxerror! Why?
> 
>   <sql:query>
>     SELECT Name, Kontinent
>       FROM Land
>       WHERE Name='<xsp:expr>request.getParameter("Name")</xsp:expr>';
>   </sql:query>
> 
> What's wrong? (see attachment)

I think you have to write the query all on one line.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung