cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Painter-Wakefield" <paint...@mc.duke.edu>
Subject Re: [C1] Cocoon SQL vs ESQL: not working?!
Date Tue, 06 Nov 2001 21:08:14 GMT

Sorry, no idea on this one.  I am using ESQL just fine on UNIX.  I didn't
have to edit the cocoon.properties file at all for the ESQL taglib, it was
already set correctly for the taglib stored in the cocoon.jar.  Can you use
any of the other Cocoon-supplied taglibs, such as request, response, or
util?

-Christopher




Please respond to cocoon-users@xml.apache.org

To:   <cocoon-users@xml.apache.org>
cc:   <paint007@mc.duke.edu>

Subject:  [C1] Cocoon SQL vs ESQL: not working?!


More clarification:

All the code works OK as is on my test machine (localhost on an NT box),
but the ESQL part does NOT work on a UNIX machine.

The ESQL that is not working, simply ignores the ESQL tags and returns the
text between them (eg. 'org.gjt.mm.mysql.Driver') as though they were XML
tags.

So - I do not think its an XSL issue per se.  I have set the path to the
ESQL library in the cocoon.properties file AND checked that the file is
physically present.

Currently out of other ideas and quite frustrated!

Any help appreciated...

Derek

>>> paint007@mc.duke.edu 19/10/2001 07:47:23 >>>

You don't say in what way the code is not working; do you get an exception,
other error message, or just no data? If the latter, are you sure your XSL
stylesheet matches the structure of the XML you are creating?

-Christopher




Please respond to cocoon-users@xml.apache.org

To:   <cocoon-users@xml.apache.org>
cc:

Subject:  [C1] Cocoon SQL vs ESQL


I have been struggling to get ESQL working... I had thought it was the
database setup, but turns out that is OK (see below) - now I am stuck
again.

Following previous suggestions, I have tried to get an equivalent of the
sample code shippped wiht Cocoon working.  I could not find any ESQL to
test, so I used the the SQL code instead - it worked!  But the - as far as
I can see - equivalent code in ESQL does not work.

I hope someone with a sharp pair of eyes can see why the first sample would
work, and the next one not??

Thanks!
Derek



<!-- WORKING -->

<?xml version="1.0"?>

<?cocoon-process type="sql"?>

<page>

 <connectiondefs>
  <connection name="foo_connection">
   <driver>org.gjt.mm.mysql.Driver</driver>
  <dburl>jdbc:mysql://myhost.com/est</dburl>
  <username>est</username>
  <password>est</password>
  </connection>
 </connectiondefs>

 <query connection="foo_connection">
  select * from computer
 </query>

<mysql>SELECT * FROM computer</mysql>

</page>


<!-- NOT WORKING??? -->

<?xml version="1.0"?>

<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet type="text/xsl" href="one_computer.xsl"?>

<xsp:page
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
  xmlns:esql="http://apache.org/cocoon/SQL/v2"
  xmlns:request="http://www.apache.org/1999/XSP/Request"
>

<page>

<esql:connection>
  <esql:driver>org.gjt.mm.mysql.Driver</esql:driver>
  <esql:dburl>jdbc:mysql://myhost.com/est</esql:dburl>
  <esql:username>est</esql:username>
  <esql:password>est</esql:password>

  <esql:execute-query>
    <esql:query>SELECT * FROM computer</esql:query>

    <esql:results>
      <esql:row-results>
        <computer>
     <system><esql:get-string column="System"/></system>
        </computer>
      </esql:row-results>
    </esql:results>

    <esql:no-results>
      <computer>
         <system>No computer</system>
      </computer>
    </esql:no-results>

  </esql:execute-query>

</esql:connection>

<mysql>SELECT * FROM computer</mysql>

</page>

</xsp:page>





---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message