cziegeler 01/07/09 05:48:22
Modified: xdocs Tag: cocoon_20_branch esql.xml sitemap.xml
Log:
Applied the docs patch
Submitted by: Torsten Curdt
Revision Changes Path
No revision
No revision
1.1.2.2 +27 -2 xml-cocoon2/xdocs/esql.xml
Index: esql.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/xdocs/esql.xml,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- esql.xml 2001/06/14 13:59:00 1.1.2.1
+++ esql.xml 2001/07/09 12:48:19 1.1.2.2
@@ -17,8 +17,8 @@
<p>It has a number of important advantages over the old (deprecated) SQL
logicsheet and SQL processor.
For example, it allows you to mix esql with other logicsheets. It also
- supports prepared statements (which gives you automatic parameter escaping) -
and even multiple encodings
- in a single query!</p>
+ supports prepared statements (which gives you automatic parameter escaping),
multiple encodings
+ in a single query and even multiple resultsets on one statement (if supported
from database)!</p>
<p>The name was chosen merely to emphasise the fact that this is an extended
version of the old sql logicsheet -
esql still uses standard SQL syntax. In fact, it is just a conversion
wrapper around your JDBC database
@@ -62,6 +62,31 @@
written in the W3C standard language XML Schema, of every single esql
element and attribute.
It is fairly human-readable and includes comments for the purpose of each
tag.</p>
+ <p>A fairly common example is to list a query result in a table. Notice
that esql:results and esql:no-results
+ are mutual exclusive. So only one of them will be in your XML tree. This
example takes a connection from a
+ datasource defined in <code>cocoon.xconf</code>:</p>
+
+ <source><![CDATA[
+<esql:connection>
+ <esql:pool>connectionName</esql:pool>
+ <esql:execute-query>
+ <esql:query>SELECT mycolumn1,mycolumn2 FROM table</esql:query>
+ <esql:results>
+ <table>
+ <esql:row-results>
+ <tr>
+ <td><esql:get-string column="mycolumn1"/></td>
+ <td><esql:get-string column="mycolumn2"/></td>
+ </tr>
+ </esql:row-results>
+ </table>
+ </esql:results>
+ <esql:no-results>
+ <p>Sorry, no results!</p>
+ </esql:no-results>
+ </esql:execute-query>
+</esql:connection>]]>
+</source>
<p>The ultimate reference, is of course the source code, which is an XSLT
logicsheet contained in the
file
<code>src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl</code></p>
1.1.1.1.2.1 +6 -6 xml-cocoon2/xdocs/sitemap.xml
Index: sitemap.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/xdocs/sitemap.xml,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.2.1
diff -u -r1.1.1.1 -r1.1.1.1.2.1
--- sitemap.xml 2001/05/09 20:50:23 1.1.1.1
+++ sitemap.xml 2001/07/09 12:48:20 1.1.1.1.2.1
@@ -253,12 +253,12 @@
<map:serializers default="html">
<map:serializer type="html" mime-type="text/html"
src="class:///org.apache.cocoon.serializer.HTMLSerializer">
- <doctype-public value="-//W3C//DTD HTML 4.0 Transitional//EN"/>
- <doctype-system value="http://www.w3.org/TR/REC-html40/loose.dtd"/>
- <preserve-space value="true"/>
- <encoding value="UTF-8"/>
- <indent value="1"/>
- <line-width value="120"/>
+ <doctype-public>-//W3C//DTD HTML 4.0 Transitional//EN</doctype-public>
+ <doctype-system>http://www.w3.org/TR/REC-html40/loose.dtd</doctype-system>
+ <preserve-space>true</preserve-space>
+ <encoding>UTF-8</encoding>
+ <indent>1</indent>
+ <line-width>120</line-width>
</map:serializer>
<map:serializer type="wap" mime-type="text/vnd.wap.wml"
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]