You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by mohamed ramzy <m_...@yahoo.com> on 2000/05/25 17:02:35 UTC

SQL strange problem!!!

hi
i'm sorry if my question is silly, but i'm new with
the sql with cocoon.

i wrote an xml file which is

<?xml-stylesheet href="tst-db.xsl" type="text/xsl"?>
<?cocoon-process type="sql"?>
<?cocoon-process type="xslt"?>

<tst>
<connectiondefs>
<connection name="first">
<driver>org.gjt.mm.mysql.Driver?</driver>
<dburl>jdbc:mysql://pawpaw.cs.nott.ac.uk:8080/~mrz/Ramzy1</dburl>
<username>mrz</username>
<password>zocka</password>
</connection>
</connectiondefs>

<query connection="first">
select *
from pet
</query>
</tst>
******************************************************

and it's XSL is
***************
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="tst">
<html>
<head/>
<body>
<xsl:apply-templates />
</body>
</html>
</xsl:template>

<xsl:template match="ROWSET">
<table border="2" cellspacing="1" cellpadding="6">
<tr>
  <th>Name</th>
  <th>Owner</th>
  <th>Species</th>
  <th>Sex</th>
  <th>Birth</th>
  <th>Death</th>
</tr>
<xsl:for-each select="ROW">
<tr>
<td><xsl:value-of select="name"/></td>
<td><xsl:value-of select="owner"/></td>
<td><xsl:value-of select="species"/></td>
<td><xsl:value-of select="sex"/></td>
<td><xsl:value-of select="birth"/></td>
<td><xsl:value-of select="death"/></td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>

the problem
************
when i try to access the xml file by cocoon.
it just prints what is written between the tags of the
XML file and nothing more
which is:

org.gjt.mm.mysql.Driver?
jdbc:mysql://pawpaw.cs.nott.ac.uk:8080/~mrz/Ramzy1 mrz
zocka select * from pet 

i did the configuration as described in the apache sql
instructions.
would u plz help me to find what is the problem....

Thanx in Advance

__________________________________________________
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
http://invites.yahoo.com/

Re: SQL strange problem!!!

Posted by Donald Ball <ba...@webslingerZ.com>.
Remove the trailing ? at the end of your driver name.

- donald

On Thu, 25 May 2000, mohamed ramzy wrote:

> hi
> i'm sorry if my question is silly, but i'm new with
> the sql with cocoon.
> 
> i wrote an xml file which is
> 
> <?xml-stylesheet href="tst-db.xsl" type="text/xsl"?>
> <?cocoon-process type="sql"?>
> <?cocoon-process type="xslt"?>
> 
> <tst>
> <connectiondefs>
> <connection name="first">
> <driver>org.gjt.mm.mysql.Driver?</driver>
> <dburl>jdbc:mysql://pawpaw.cs.nott.ac.uk:8080/~mrz/Ramzy1</dburl>
> <username>mrz</username>
> <password>zocka</password>
> </connection>
> </connectiondefs>
> 
> <query connection="first">
> select *
> from pet
> </query>
> </tst>
> ******************************************************
> 
> and it's XSL is
> ***************
> <?xml version="1.0"?>
> <xsl:stylesheet
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:template match="tst">
> <html>
> <head/>
> <body>
> <xsl:apply-templates />
> </body>
> </html>
> </xsl:template>
> 
> <xsl:template match="ROWSET">
> <table border="2" cellspacing="1" cellpadding="6">
> <tr>
>   <th>Name</th>
>   <th>Owner</th>
>   <th>Species</th>
>   <th>Sex</th>
>   <th>Birth</th>
>   <th>Death</th>
> </tr>
> <xsl:for-each select="ROW">
> <tr>
> <td><xsl:value-of select="name"/></td>
> <td><xsl:value-of select="owner"/></td>
> <td><xsl:value-of select="species"/></td>
> <td><xsl:value-of select="sex"/></td>
> <td><xsl:value-of select="birth"/></td>
> <td><xsl:value-of select="death"/></td>
> </tr>
> </xsl:for-each>
> </table>
> </xsl:template>
> </xsl:stylesheet>
> 
> the problem
> ************
> when i try to access the xml file by cocoon.
> it just prints what is written between the tags of the
> XML file and nothing more
> which is:
> 
> org.gjt.mm.mysql.Driver?
> jdbc:mysql://pawpaw.cs.nott.ac.uk:8080/~mrz/Ramzy1 mrz
> zocka select * from pet 
> 
> i did the configuration as described in the apache sql
> instructions.
> would u plz help me to find what is the problem....
> 
> Thanx in Advance
> 
> __________________________________________________
> Do You Yahoo!?
> Kick off your party with Yahoo! Invites.
> http://invites.yahoo.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 
>