cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sonney <ke...@webslingerz.com>
Subject Re: AW: HERE: I can't execute ANY esql-queries
Date Wed, 22 Nov 2000 02:48:51 GMT
On Wed, 22 Nov 2000, Christian Parpart wrote:
> Hmm, after reading your question, I've downloaded the lates
> cvs (some minutes ago). But it's the same. So I should conclude
> that the problem isn't here maybe. That's why I post my hole
> test file below.

Ah, But it is. you have run into the saem problem that I have, and it's a
really easy fix.

See, donald changed how esql works. He's moved to his final schema. The
new schema is slightly incompatable with the old one. By "slightly" I mean
that with some minor changes to *ALL* your esql documents, it will work
again.

Try the "new and improved" test.xml I have for you below. I've commented
where apropriate.

------ test.xml --------------------------------------
<?xml version="1.0"?>

<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<?xml-logicsheet href="test-lib.xsl"?>
<?xml-logicsheet
href="resource://org/apache/cocoon/processor/xsp/library/sql/esql.xsl"?>

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

<xsp:page
  language="java"
  xmlns:esql="http://apache.org/cocoon/SQL/v2"
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
  xmlns:test="http://www.erdkunde-online.itl/test"
>

  <page>
    <title>Test</title>
    <test:test/>
    <!-- New esql taglib root element -->
    <esql:connection>
      <!-- The same old driver params -->
      <esql:driver>org.gjt.mm.mysql.Driver</esql:driver>
      <esql:dburl>jdbc:mysql://www.erdkunde-online.itl/eko</esql:dburl>
      <esql:username>anuser</esql:username>
      <esql:password>anpasswd</esql:password>
      <!-- the old query container - we can now have more than one of
these per connection -->
      <esql:execute-query>
        <!-- the query itself -->
        <esql:query>select * from Land</esql:query>
        <!-- Now, to process the results -->
        <esql:results>
         <!-- we have to tell esql we're doing row-by row results -->
         <esql:row-results>
         <!-- this hasn't changed -->
         <b><esql:get-string column="Name"/></b>
         </esql:row--results>
        <!-- there are now other tags to add here, for error processing,
or "no results" messages -->
       </esql:results>
     </esql:execute-query>
     <!-- if we needed to run a different query, we could here, I think -->
    </esql:connection>
   </page>

</xsp:page>


-- 
+-------------------------------------------+
| Kevin Sonney        kevin@webslingerZ.com |
| Systems Programmer    www.webslingerZ.com |
+-------------------------------------------+

"The weakest link in any civil rights case is always the
defendant. Imagine being a lawyer and getting a call from me. That's why I
try to, uh, behave myself." - Hunter S. Thompson



Mime
View raw message