cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Echoes <ech...@free.fr>
Subject SQL taglib
Date Fri, 12 May 2000 13:54:16 GMT
 Hello,

 I'm just starting an application using
an Oracle database. I can successfully
make request using the SQLProcessor, but
it fails using the tag lib. Here are my
files, with a simplistic stylesheet. What's
wrong with it ?

 Thanks

	Fabrice

Working example with SQL Processor :

<?xml version="1.0"?>
<?xml-stylesheet href="style.xsl" type="text/xsl"?>
<?cocoon-process type="sql"?>
<?cocoon-process type="xslt"?>

<page>

 <connectiondefs>
  <connection name="compagnon">
   <driver>oracle.jdbc.driver.OracleDriver</driver>
   <dburl>jdbc:oracle:thin:@localhost:1521:CPGN</dburl>
   <username>compagnon</username>
   <password>compagnon</password>
  </connection>
 </connectiondefs> 
 
 <query connection="compagnon">
  select * from espace 
 </query>
 
</page>

Broken example with the taglib :

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

<xsp:page
   language="java"
   xmlns:sql="http://www.apache.org/1999/SQL"
   xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>
<page>
<sql:execute-query>
<sql:driver>oracle.jdbc.driver.OracleDriver</sql:driver>
<sql:dburl>jdbc:oracle:thin:@localhost:1521:CPGN</sql:dburl>
<sql:username>compagnon</sql:username>
<sql:password>compagnon</sql:password>
<sql:doc-element>ROWSET</sql:doc-element>
<sql:row-element>ROW</sql:row-element>
<sql:query>select * from espace</sql:query>
<sql:count-attribute>count</sql:count-attribute>
</sql:execute-query>
</page>
</xsp:page>

And the stylesheet :

<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="4.0"/>
<xsl:template match="/">
<html>
<body>

<table border="1">
<tr><th>User</th><th>Password</th></tr>
<xsl:for-each select="page/ROWSET/ROW">
<tr>
<td><xsl:value-of select="ID_USER"/></td>
<td><xsl:value-of select="PASSWORD"/></td>
</tr>
</xsl:for-each>
</table>
	  
</body>
</html>
</xsl:template>
</xsl:stylesheet>

Mime
View raw message