cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sonney <ke...@webslingerz.com>
Subject Re: Which comes first?
Date Thu, 17 Aug 2000 10:41:51 GMT
On Thu, 17 Aug 2000, Wong Shin Neng wrote:
> I thought using the XSP SQL logicsheet is an alternative?  What's the big
> difference?  Althogh I thought using the SQL processor seems more efficient
> because u put the connection definitions is one chuck and use them any part
> in the xml document.

Actualy, development ahs halted on the SQL Logicsheet. Donald has said so
several times on list, and I suppose that the cocoon dev guys (*hint*
*hint*) might want to mark it as depricated like they do with the DSP
processor.

The big thing is that the XSP SQL Logic sheet uses XSP, and therefor
allows you to actually use more than *JUST* the request data and XSL to
get query info. 

And you can still define a single connection block, like so :

<!-- begin sample sql doxument -->
<?xml version="1.0"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY sql_params SYSTEM "db_defs.xml">
]>

<?cocoon-process type="xsp"?>
<?cocoon-format type"text/html"?>

<xsp:page 
	language="java"
	xmlns:xsp="http://www.apache.org/1999/XSP/Core"
	xmlns:sql="http://www.apache.org/1999/SQL"
>

<page>
<sql:execute-query>
	&sql_params;
	<sql:max-rows>3</sql:max-rows>
	<sql:skip-rows>0</sql:skip-rows>
	<sql:doc-element>samples</sql:doc-element>
	<sql:row-element>sample</sql:row-element>
	<sql:query>select * from sample_table</sql:query>
</sql:execute-query>
</page>
</xsp:page>
<!-- End Sample page -->

<!-- begin db_defs.xml -->
<?xml version="1.0" encoding="UTF-8"?>

<sql:driver>your.jdbc.Driver</sql:driver>
<sql:dburl>jdbc://your.drive.url/</sql:dburl>
<sql:username>username</sql:username>
<sql:password>password</sql:password>
<sql:tag-case>lower</sql:tag-case>
<sql:update-rows-attribute>updated</sql:update-rows-attribute>

<!-- end db_defs.xml -->

I'm designing an app that uses jsut *ONE* db_defs.xml for about 30 pages
so far. 

HTH..

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


Mime
View raw message