joerg 2003/10/16 15:08:22
Modified: site/2.1/userdocs/transformers augment-transformer.html
augment-transformer.pdf cinclude-transformer.html
cinclude-transformer.pdf encodeurl-transformer.html
encodeurl-transformer.pdf
extractor-transformer.html
extractor-transformer.pdf filter-transformer.html
filter-transformer.pdf i18n-transformer.html
i18n-transformer.pdf ldap-transformer.html
ldap-transformer.pdf lexer-transformer.html
lexer-transformer.pdf log-transformer.html
log-transformer.pdf parser-transformer.html
parser-transformer.pdf pattern-transformer.html
pattern-transformer.pdf
readdomsession-transformer.html
readdomsession-transformer.pdf
sourcewriting-transformer.html
sourcewriting-transformer.pdf sql-transformer.html
sql-transformer.pdf transformers.html
transformers.pdf writedomsession-transformer.html
writedomsession-transformer.pdf
xinclude-transformer.html xinclude-transformer.pdf
xslt-transformer.html xslt-transformer.pdf
Log:
SQL transformer: moved to "optional"
Revision Changes Path
1.8 +4 -4
cocoon-site/site/2.1/userdocs/transformers/augment-transformer.html
Index: augment-transformer.html
===================================================================
RCS file:
/home/cvs/cocoon-site/site/2.1/userdocs/transformers/augment-transformer.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- augment-transformer.html 12 Oct 2003 16:39:54 -0000 1.7
+++ augment-transformer.html 16 Oct 2003 22:08:20 -0000 1.8
@@ -146,10 +146,6 @@
</li>
<li>
-<a href="sql-transformer.html">SQL Transformer</a>
-</li>
-
-<li>
<a href="filter-transformer.html">Filter Transformer</a>
</li>
@@ -205,6 +201,10 @@
<li>
<a href="../../developing/webapps/contexts.html">Session Transformer</a>
+</li>
+
+<li>
+<a href="sql-transformer.html">SQL Transformer</a>
</li>
</ul>
1.4 +19 -19
cocoon-site/site/2.1/userdocs/transformers/augment-transformer.pdf
<<Binary file>>
1.8 +4 -4
cocoon-site/site/2.1/userdocs/transformers/cinclude-transformer.html
Index: cinclude-transformer.html
===================================================================
RCS file:
/home/cvs/cocoon-site/site/2.1/userdocs/transformers/cinclude-transformer.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- cinclude-transformer.html 12 Oct 2003 16:39:54 -0000 1.7
+++ cinclude-transformer.html 16 Oct 2003 22:08:20 -0000 1.8
@@ -146,10 +146,6 @@
</li>
<li>
-<a href="sql-transformer.html">SQL Transformer</a>
-</li>
-
-<li>
<a href="filter-transformer.html">Filter Transformer</a>
</li>
@@ -205,6 +201,10 @@
<li>
<a href="../../developing/webapps/contexts.html">Session Transformer</a>
+</li>
+
+<li>
+<a href="sql-transformer.html">SQL Transformer</a>
</li>
</ul>
1.4 +48 -48
cocoon-site/site/2.1/userdocs/transformers/cinclude-transformer.pdf
<<Binary file>>
1.8 +29 -3
cocoon-site/site/2.1/userdocs/transformers/encodeurl-transformer.html
Index: encodeurl-transformer.html
===================================================================
RCS file:
/home/cvs/cocoon-site/site/2.1/userdocs/transformers/encodeurl-transformer.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- encodeurl-transformer.html 12 Oct 2003 16:39:54 -0000 1.7
+++ encodeurl-transformer.html 16 Oct 2003 22:08:20 -0000 1.8
@@ -98,89 +98,115 @@
<li>
<font color="#CFDCED">Navigation</font>
<ul>
+
<li>
<a href="../../index.html">Main</a>
</li>
+
<li>
<a href="../index.html">User Documentation</a>
</li>
+
</ul>
</li>
<li>
<font color="#CFDCED">Transformers</font>
<ul>
+
<li>
<a href="transformers.html">Overview</a>
</li>
+
</ul>
</li>
<li>
<font color="#CFDCED">Default</font>
<ul>
+
<li>
<a href="xslt-transformer.html">XSLT Transformer</a>
</li>
+
</ul>
</li>
<li>
<font color="#CFDCED">Core</font>
<ul>
+
<li>
<a href="extractor-transformer.html">Fragment Extractor Transformer</a>
</li>
+
<li>
<a href="i18n-transformer.html">I18n Transformer</a>
</li>
+
<li>
<a href="log-transformer.html">Log Transformer</a>
</li>
-<li>
-<a href="sql-transformer.html">SQL Transformer</a>
-</li>
+
<li>
<a href="filter-transformer.html">Filter Transformer</a>
</li>
+
<li>
<a href="readdomsession-transformer.html">Read DOM Session Transformer</a>
</li>
+
<li>
<a href="writedomsession-transformer.html">Write DOM Session Transformer</a>
</li>
+
<li>
<a href="xinclude-transformer.html">XInclude Transformer</a>
</li>
+
<li>
<a href="cinclude-transformer.html">CInclude Transformer</a>
</li>
+
<li>
<span class="sel"><font color="#ffcc00">EncodeURL Transformer</font></span>
</li>
+
<li>
<a href="sourcewriting-transformer.html">SourceWriting Transformer</a>
</li>
+
<li>
<a href="augment-transformer.html">Augment Transformer</a>
</li>
+
</ul>
</li>
<li>
<font color="#CFDCED">Optional</font>
<ul>
+
<li>
<a href="ldap-transformer.html">LDAP Transformer</a>
</li>
+
<li>
<a href="lexer-transformer.html">Lexical Transformer</a>
</li>
+
<li>
<a href="parser-transformer.html">Parser Transformer</a>
</li>
+
<li>
<a href="pattern-transformer.html">Pattern Transformer</a>
</li>
+
<li>
<a href="../../developing/webapps/contexts.html">Session Transformer</a>
</li>
+
+<li>
+<a href="sql-transformer.html">SQL Transformer</a>
+</li>
+
</ul>
</li>
</ul>
1.4 +19 -19
cocoon-site/site/2.1/userdocs/transformers/encodeurl-transformer.pdf
<<Binary file>>
1.8 +4 -4
cocoon-site/site/2.1/userdocs/transformers/extractor-transformer.html
Index: extractor-transformer.html
===================================================================
RCS file:
/home/cvs/cocoon-site/site/2.1/userdocs/transformers/extractor-transformer.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- extractor-transformer.html 12 Oct 2003 16:39:54 -0000 1.7
+++ extractor-transformer.html 16 Oct 2003 22:08:20 -0000 1.8
@@ -146,10 +146,6 @@
</li>
<li>
-<a href="sql-transformer.html">SQL Transformer</a>
-</li>
-
-<li>
<a href="filter-transformer.html">Filter Transformer</a>
</li>
@@ -205,6 +201,10 @@
<li>
<a href="../../developing/webapps/contexts.html">Session Transformer</a>
+</li>
+
+<li>
+<a href="sql-transformer.html">SQL Transformer</a>
</li>
</ul>
1.4 +16 -16
cocoon-site/site/2.1/userdocs/transformers/extractor-transformer.pdf
<<Binary file>>
1.8 +4 -4
cocoon-site/site/2.1/userdocs/transformers/filter-transformer.html
Index: filter-transformer.html
===================================================================
RCS file:
/home/cvs/cocoon-site/site/2.1/userdocs/transformers/filter-transformer.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- filter-transformer.html 12 Oct 2003 16:39:54 -0000 1.7
+++ filter-transformer.html 16 Oct 2003 22:08:20 -0000 1.8
@@ -146,10 +146,6 @@
</li>
<li>
-<a href="sql-transformer.html">SQL Transformer</a>
-</li>
-
-<li>
<span class="sel"><font color="#ffcc00">Filter Transformer</font></span>
</li>
@@ -205,6 +201,10 @@
<li>
<a href="../../developing/webapps/contexts.html">Session Transformer</a>
+</li>
+
+<li>
+<a href="sql-transformer.html">SQL Transformer</a>
</li>
</ul>
1.4 +19 -19
cocoon-site/site/2.1/userdocs/transformers/filter-transformer.pdf
<<Binary file>>
1.8 +4 -4
cocoon-site/site/2.1/userdocs/transformers/i18n-transformer.html
Index: i18n-transformer.html
===================================================================
RCS file:
/home/cvs/cocoon-site/site/2.1/userdocs/transformers/i18n-transformer.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- i18n-transformer.html 12 Oct 2003 16:39:54 -0000 1.7
+++ i18n-transformer.html 16 Oct 2003 22:08:20 -0000 1.8
@@ -146,10 +146,6 @@
</li>
<li>
-<a href="sql-transformer.html">SQL Transformer</a>
-</li>
-
-<li>
<a href="filter-transformer.html">Filter Transformer</a>
</li>
@@ -205,6 +201,10 @@
<li>
<a href="../../developing/webapps/contexts.html">Session Transformer</a>
+</li>
+
+<li>
+<a href="sql-transformer.html">SQL Transformer</a>
</li>
</ul>
1.6 +139 -139
cocoon-site/site/2.1/userdocs/transformers/i18n-transformer.pdf
<<Binary file>>
1.9 +29 -3
cocoon-site/site/2.1/userdocs/transformers/ldap-transformer.html
Index: ldap-transformer.html
===================================================================
RCS file:
/home/cvs/cocoon-site/site/2.1/userdocs/transformers/ldap-transformer.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ldap-transformer.html 12 Oct 2003 16:39:54 -0000 1.8
+++ ldap-transformer.html 16 Oct 2003 22:08:20 -0000 1.9
@@ -98,89 +98,115 @@
<li>
<font color="#CFDCED">Navigation</font>
<ul>
+
<li>
<a href="../../index.html">Main</a>
</li>
+
<li>
<a href="../index.html">User Documentation</a>
</li>
+
</ul>
</li>
<li>
<font color="#CFDCED">Transformers</font>
<ul>
+
<li>
<a href="transformers.html">Overview</a>
</li>
+
</ul>
</li>
<li>
<font color="#CFDCED">Default</font>
<ul>
+
<li>
<a href="xslt-transformer.html">XSLT Transformer</a>
</li>
+
</ul>
</li>
<li>
<font color="#CFDCED">Core</font>
<ul>
+
<li>
<a href="extractor-transformer.html">Fragment Extractor Transformer</a>
</li>
+
<li>
<a href="i18n-transformer.html">I18n Transformer</a>
</li>
+
<li>
<a href="log-transformer.html">Log Transformer</a>
</li>
-<li>
-<a href="sql-transformer.html">SQL Transformer</a>
-</li>
+
<li>
<a href="filter-transformer.html">Filter Transformer</a>
</li>
+
<li>
<a href="readdomsession-transformer.html">Read DOM Session Transformer</a>
</li>
+
<li>
<a href="writedomsession-transformer.html">Write DOM Session Transformer</a>
</li>
+
<li>
<a href="xinclude-transformer.html">XInclude Transformer</a>
</li>
+
<li>
<a href="cinclude-transformer.html">CInclude Transformer</a>
</li>
+
<li>
<a href="encodeurl-transformer.html">EncodeURL Transformer</a>
</li>
+
<li>
<a href="sourcewriting-transformer.html">SourceWriting Transformer</a>
</li>
+
<li>
<a href="augment-transformer.html">Augment Transformer</a>
</li>
+
</ul>
</li>
<li>
<font color="#CFDCED">Optional</font>
<ul>
+
<li>
<span class="sel"><font color="#ffcc00">LDAP Transformer</font></span>
</li>
+
<li>
<a href="lexer-transformer.html">Lexical Transformer</a>
</li>
+
<li>
<a href="parser-transformer.html">Parser Transformer</a>
</li>
+
<li>
<a href="pattern-transformer.html">Pattern Transformer</a>
</li>
+
<li>
<a href="../../developing/webapps/contexts.html">Session Transformer</a>
</li>
+
+<li>
+<a href="sql-transformer.html">SQL Transformer</a>
+</li>
+
</ul>
</li>
</ul>
1.4 +19 -19
cocoon-site/site/2.1/userdocs/transformers/ldap-transformer.pdf
<<Binary file>>
1.8 +4 -4
cocoon-site/site/2.1/userdocs/transformers/lexer-transformer.html
Index: lexer-transformer.html
===================================================================
RCS file:
/home/cvs/cocoon-site/site/2.1/userdocs/transformers/lexer-transformer.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- lexer-transformer.html 12 Oct 2003 16:39:54 -0000 1.7
+++ lexer-transformer.html 16 Oct 2003 22:08:21 -0000 1.8
@@ -146,10 +146,6 @@
</li>
<li>
-<a href="sql-transformer.html">SQL Transformer</a>
-</li>
-
-<li>
<a href="filter-transformer.html">Filter Transformer</a>
</li>
@@ -205,6 +201,10 @@
<li>
<a href="../../developing/webapps/contexts.html">Session Transformer</a>
+</li>
+
+<li>
+<a href="sql-transformer.html">SQL Transformer</a>
</li>
</ul>
1.4 +20 -20
cocoon-site/site/2.1/userdocs/transformers/lexer-transformer.pdf
<<Binary file>>
1.8 +4 -4
cocoon-site/site/2.1/userdocs/transformers/log-transformer.html
Index: log-transformer.html
===================================================================
RCS file:
/home/cvs/cocoon-site/site/2.1/userdocs/transformers/log-transformer.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- log-transformer.html 12 Oct 2003 16:39:54 -0000 1.7
+++ log-transformer.html 16 Oct 2003 22:08:21 -0000 1.8
@@ -146,10 +146,6 @@
</li>
<li>
-<a href="sql-transformer.html">SQL Transformer</a>
-</li>
-
-<li>
<a href="filter-transformer.html">Filter Transformer</a>
</li>
@@ -205,6 +201,10 @@
<li>
<a href="../../developing/webapps/contexts.html">Session Transformer</a>
+</li>
+
+<li>
+<a href="sql-transformer.html">SQL Transformer</a>
</li>
</ul>
1.4 +17 -17
cocoon-site/site/2.1/userdocs/transformers/log-transformer.pdf
<<Binary file>>
1.8 +29 -3
cocoon-site/site/2.1/userdocs/transformers/parser-transformer.html
Index: parser-transformer.html
===================================================================
RCS file:
/home/cvs/cocoon-site/site/2.1/userdocs/transformers/parser-transformer.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- parser-transformer.html 12 Oct 2003 16:39:54 -0000 1.7
+++ parser-transformer.html 16 Oct 2003 22:08:21 -0000 1.8
@@ -98,89 +98,115 @@
<li>
<font color="#CFDCED">Navigation</font>
<ul>
+
<li>
<a href="../../index.html">Main</a>
</li>
+
<li>
<a href="../index.html">User Documentation</a>
</li>
+
</ul>
</li>
<li>
<font color="#CFDCED">Transformers</font>
<ul>
+
<li>
<a href="transformers.html">Overview</a>
</li>
+
</ul>
</li>
<li>
<font color="#CFDCED">Default</font>
<ul>
+
<li>
<a href="xslt-transformer.html">XSLT Transformer</a>
</li>
+
</ul>
</li>
<li>
<font color="#CFDCED">Core</font>
<ul>
+
<li>
<a href="extractor-transformer.html">Fragment Extractor Transformer</a>
</li>
+
<li>
<a href="i18n-transformer.html">I18n Transformer</a>
</li>
+
<li>
<a href="log-transformer.html">Log Transformer</a>
</li>
-<li>
-<a href="sql-transformer.html">SQL Transformer</a>
-</li>
+
<li>
<a href="filter-transformer.html">Filter Transformer</a>
</li>
+
<li>
<a href="readdomsession-transformer.html">Read DOM Session Transformer</a>
</li>
+
<li>
<a href="writedomsession-transformer.html">Write DOM Session Transformer</a>
</li>
+
<li>
<a href="xinclude-transformer.html">XInclude Transformer</a>
</li>
+
<li>
<a href="cinclude-transformer.html">CInclude Transformer</a>
</li>
+
<li>
<a href="encodeurl-transformer.html">EncodeURL Transformer</a>
</li>
+
<li>
<a href="sourcewriting-transformer.html">SourceWriting Transformer</a>
</li>
+
<li>
<a href="augment-transformer.html">Augment Transformer</a>
</li>
+
</ul>
</li>
<li>
<font color="#CFDCED">Optional</font>
<ul>
+
<li>
<a href="ldap-transformer.html">LDAP Transformer</a>
</li>
+
<li>
<a href="lexer-transformer.html">Lexical Transformer</a>
</li>
+
<li>
<span class="sel"><font color="#ffcc00">Parser Transformer</font></span>
</li>
+
<li>
<a href="pattern-transformer.html">Pattern Transformer</a>
</li>
+
<li>
<a href="../../developing/webapps/contexts.html">Session Transformer</a>
</li>
+
+<li>
+<a href="sql-transformer.html">SQL Transformer</a>
+</li>
+
</ul>
</li>
</ul>
1.4 +20 -20
cocoon-site/site/2.1/userdocs/transformers/parser-transformer.pdf
<<Binary file>>
1.8 +4 -4
cocoon-site/site/2.1/userdocs/transformers/pattern-transformer.html
Index: pattern-transformer.html
===================================================================
RCS file:
/home/cvs/cocoon-site/site/2.1/userdocs/transformers/pattern-transformer.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- pattern-transformer.html 12 Oct 2003 16:39:54 -0000 1.7
+++ pattern-transformer.html 16 Oct 2003 22:08:21 -0000 1.8
@@ -146,10 +146,6 @@
</li>
<li>
-<a href="sql-transformer.html">SQL Transformer</a>
-</li>
-
-<li>
<a href="filter-transformer.html">Filter Transformer</a>
</li>
@@ -205,6 +201,10 @@
<li>
<a href="../../developing/webapps/contexts.html">Session Transformer</a>
+</li>
+
+<li>
+<a href="sql-transformer.html">SQL Transformer</a>
</li>
</ul>
1.4 +20 -20
cocoon-site/site/2.1/userdocs/transformers/pattern-transformer.pdf
<<Binary file>>
1.9 +3 -29
cocoon-site/site/2.1/userdocs/transformers/readdomsession-transformer.html
Index: readdomsession-transformer.html
===================================================================
RCS file:
/home/cvs/cocoon-site/site/2.1/userdocs/transformers/readdomsession-transformer.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- readdomsession-transformer.html 12 Oct 2003 16:39:54 -0000 1.8
+++ readdomsession-transformer.html 16 Oct 2003 22:08:21 -0000 1.9
@@ -98,115 +98,89 @@
<li>
<font color="#CFDCED">Navigation</font>
<ul>
-
<li>
<a href="../../index.html">Main</a>
</li>
-
<li>
<a href="../index.html">User Documentation</a>
</li>
-
</ul>
</li>
<li>
<font color="#CFDCED">Transformers</font>
<ul>
-
<li>
<a href="transformers.html">Overview</a>
</li>
-
</ul>
</li>
<li>
<font color="#CFDCED">Default</font>
<ul>
-
<li>
<a href="xslt-transformer.html">XSLT Transformer</a>
</li>
-
</ul>
</li>
<li>
<font color="#CFDCED">Core</font>
<ul>
-
<li>
<a href="extractor-transformer.html">Fragment Extractor Transformer</a>
</li>
-
<li>
<a href="i18n-transformer.html">I18n Transformer</a>
</li>
-
<li>
<a href="log-transformer.html">Log Transformer</a>
</li>
-
-<li>
-<a href="sql-transformer.html">SQL Transformer</a>
-</li>
-
<li>
<a href="filter-transformer.html">Filter Transformer</a>
</li>
-
<li>
<span class="sel"><font color="#ffcc00">Read DOM Session
Transformer</font></span>
</li>
-
<li>
<a href="writedomsession-transformer.html">Write DOM Session Transformer</a>
</li>
-
<li>
<a href="xinclude-transformer.html">XInclude Transformer</a>
</li>
-
<li>
<a href="cinclude-transformer.html">CInclude Transformer</a>
</li>
-
<li>
<a href="encodeurl-transformer.html">EncodeURL Transformer</a>
</li>
-
<li>
<a href="sourcewriting-transformer.html">SourceWriting Transformer</a>
</li>
-
<li>
<a href="augment-transformer.html">Augment Transformer</a>
</li>
-
</ul>
</li>
<li>
<font color="#CFDCED">Optional</font>
<ul>
-
<li>
<a href="ldap-transformer.html">LDAP Transformer</a>
</li>
-
<li>
<a href="lexer-transformer.html">Lexical Transformer</a>
</li>
-
<li>
<a href="parser-transformer.html">Parser Transformer</a>
</li>
-
<li>
<a href="pattern-transformer.html">Pattern Transformer</a>
</li>
-
<li>
<a href="../../developing/webapps/contexts.html">Session Transformer</a>
</li>
-
+<li>
+<a href="sql-transformer.html">SQL Transformer</a>
+</li>
</ul>
</li>
</ul>
1.4 +19 -19
cocoon-site/site/2.1/userdocs/transformers/readdomsession-transformer.pdf
<<Binary file>>
1.8 +4 -4
cocoon-site/site/2.1/userdocs/transformers/sourcewriting-transformer.html
Index: sourcewriting-transformer.html
===================================================================
RCS file:
/home/cvs/cocoon-site/site/2.1/userdocs/transformers/sourcewriting-transformer.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- sourcewriting-transformer.html 12 Oct 2003 16:39:54 -0000 1.7
+++ sourcewriting-transformer.html 16 Oct 2003 22:08:21 -0000 1.8
@@ -146,10 +146,6 @@
</li>
<li>
-<a href="sql-transformer.html">SQL Transformer</a>
-</li>
-
-<li>
<a href="filter-transformer.html">Filter Transformer</a>
</li>
@@ -205,6 +201,10 @@
<li>
<a href="../../developing/webapps/contexts.html">Session Transformer</a>
+</li>
+
+<li>
+<a href="sql-transformer.html">SQL Transformer</a>
</li>
</ul>
1.5 +124 -124
cocoon-site/site/2.1/userdocs/transformers/sourcewriting-transformer.pdf
<<Binary file>>
1.9 +500 -511
cocoon-site/site/2.1/userdocs/transformers/sql-transformer.html
Index: sql-transformer.html
===================================================================
RCS file:
/home/cvs/cocoon-site/site/2.1/userdocs/transformers/sql-transformer.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- sql-transformer.html 12 Oct 2003 16:39:54 -0000 1.8
+++ sql-transformer.html 16 Oct 2003 22:08:21 -0000 1.9
@@ -146,10 +146,6 @@
</li>
<li>
-<span class="sel"><font color="#ffcc00">SQL Transformer</font></span>
-</li>
-
-<li>
<a href="filter-transformer.html">Filter Transformer</a>
</li>
@@ -206,6 +202,10 @@
<li>
<a href="../../developing/webapps/contexts.html">Session Transformer</a>
</li>
+
+<li>
+<span class="sel"><font color="#ffcc00">SQL Transformer</font></span>
+</li>
</ul>
</li>
@@ -308,575 +308,564 @@
</ul>
</li>
</ul>
-
-
-
+
<a name="N1001A"></a><a name="Introduction"></a>
<h3>Introduction</h3>
<div style="margin-left: 0 ; border: 2px">
<p>
-The purpose of the SQLTransformer is to query a database and translate the
-result to XML. To retrieve the information from the database, you are not
-restricted to use simple SQL statements (eg select, insert, update), it is
also
-possible to use stored procedures. In combination with other transformers
(eg
-FilterTransformer), this one can be very powerful.
-</p>
+ The purpose of the SQLTransformer is to query a database and
translate
+ the result to XML. To retrieve the information from the database, you
+ are not restricted to use simple SQL statements (e.g. select, insert,
+ update), it is also possible to use stored procedures. In combination
+ with other transformers (e.g. FilterTransformer), this one can be
very
+ powerful.
+ </p>
<ul>
-
-<li>Name : sql</li>
-
+
+<li>Name: sql</li>
+
<li>Class: org.apache.cocoon.transformation.SQLTransformer</li>
-
-<li>Cacheable: no.</li>
-
+
+<li>Cacheable: no</li>
+
</ul>
</div>
-
-
+
<a name="N1002F"></a><a name="Basic+functionality"></a>
<h3>Basic functionality</h3>
<div style="margin-left: 0 ; border: 2px">
<p>
-To be able to query a database, we need XML that describes exactly what we
want
-to do. The general structure of this input XML is as follows:
-</p>
-<pre class="code">
-
- <page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
- <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
- <query>
- <!-- here comes the SQL statement or stored procedure -->
- </query>
- </execute-query>
- </page>
-
- </pre>
-<p>
-Nothing prevents you from putting other XML around the page element. If you
do,
-it will stay untouched. The format of the SQL statement or the stored
procedure
-is exactly the same as if you would call it directly from java with a
prepared
-statement or a callable statement.
-</p>
-<p>
-The query element has the following optional attributes:
-</p>
+ To be able to query a database, we need XML that describes exactly
what
+ we want to do. The general structure of this input XML is as follows:
+ </p>
+<pre class="code">
+
+ <page>
+ <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
+ <query>
+ <!-- here comes the SQL statement or stored procedure -->
+ </query>
+ </execute-query>
+ </page>
+ </pre>
+<p>
+ Nothing prevents you from putting other XML around the
+ <span class="codefrag">execute-query</span> element. Any element not
in the SQL namespace
+ will stay untouched. The format of the SQL statement or the stored
+ procedure is exactly the same as if you would call it directly from
java
+ with a prepared statement or a callable statement.
+ </p>
+<p>The query element has the following optional attributes:</p>
<ol>
-
-<li>
-name:
-Naming a query implicates naming the corresponding rowset (see below).
-When you have a sequence of queries you want to execute, it can be handy
give
-them a name. To process the retrieved data of a certain query, you can use
-another transformer to check the name of the rowset and to execute the
necessary
-business logic on it.
-<br>
-usage: <query name="myName">
-</li>
-
+
<li>
-isstoredprocedure:
-When you want to use stored procedures, you have to explicitly add this
-attribute to the query element. By default, the transformer assumes that you
-want to execute a SQL statement.
-<br>
-usage: <query isstoredprocedure="true">
-
+
+<strong>name</strong>:
+ Naming a query implicates naming the corresponding rowset (see
below).
+ When you have a sequence of queries you want to execute, it can be
+ handy give them a name. To process the retrieved data of a certain
+ query, you can use another transformer to check the name of the
rowset
+ and to execute the necessary business logic on it.
+ <br>
+ usage: <span class="codefrag"><query name="myName"></span>
+
+</li>
+
+<li>
+
+<strong>isstoredprocedure</strong>:
+ When you want to use stored procedures, you have to explicitly add
+ this attribute to the query element. By default, the transformer
+ assumes that you want to execute a SQL statement.
+ <br>
+ usage: <span class="codefrag"><query
isstoredprocedure="true"></span>
+
</li>
-
+
</ol>
-<p>
-Here is an example of how the input XML might look like:
-</p>
+<p>Here is an example of how the input XML might look like:</p>
<pre class="code">
-
- <page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
-
- <title>Hello</title>
- <content>
- <para>This is my first Cocoon page filled with sql
data!</para>
-
- <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
- <query name="department">
- select id,name from department_table
- </query>
- </execute-query>
- </content>
- </page>
-
- </pre>
-<p>
-You can use the file generator to retrieve the XML from the filesystem.
-To invoke the SQLTransformer you have to add following to the sitemap:
-</p>
-<pre class="code">
-
- <map:transform type="sql">
- <map:parameter name="use-connection" value="personnel"/>
- <map:parameter name="show-nr-of-rows" value="true"/>
- <map:parameter name="clob-encoding" value="UTF-8"/>
- </map:transform>
-
- </pre>
-<p>
-The "use-connection" parameter defines which connection, defined under the
-datasources element in cocoon.xconf, the SQLTransformer has to use to
retrieve
-the data.
-</p>
-<p>
-The 'show-nr-of-rows' instructs the transformer to count the number of rows
in
-the resultset explicitly and to set the result as attribute to the rowset
-element. This attribute is only useful in combination with an sql statement,
-not with stored procedures. If a stored procedure returns a resultset and
you
-want to know how many rows it contains, you have to count the number of
rows in
-another transformer or your stored procedure has to return it also (last
-solution is the best one)
-</p>
-<p>
-The "clob-encoding" parameter defines what encoding should be used in
-getting content from CLOB columns.
-</p>
-<p>
-The output XML will look as follows:
-</p>
-<pre class="code">
-
- <page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
- <title>Hello</title>
- <content>
- <para>This is my first Cocoon page filled with sql
data!</para>
- <rowset nrofrows="2" name="department"
- xmlns="http://apache.org/cocoon/SQL/2.0">
- <row>
- <id>1</id>
- <name>Programmers</name>
- </row>
- <row>
- <id>2</id>
- <name>Loungers</name>
- </row>
- </rowset>
- </content>
- </page>
-
- </pre>
-<p>
-If you use this in combination with the "simple-sql2html" XSL stylesheet,
-</p>
-<pre class="code">
-
- <map:transform src="stylesheets/simple-sql2html.xsl"/>
-
- </pre>
-<p>
-you will get a more visually attractive page.
-</p>
-<p>
-See below for a more in depth example with stored procedures.
-</p>
-<p>
-By now you should be able to use the SQLTransformer, but there are some more
-options you might find useful...
-</p>
+
+ <page>
+ <title>Hello</title>
+ <content>
+ <para>This is my first Cocoon page filled with sql
data!</para>
+ <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
+ <query name="department">
+ select id,name from department_table
+ </query>
+ </execute-query>
+ </content>
+ </page>
+ </pre>
+<p>
+ You can use the file generator to retrieve the XML from the
filesystem.
+ To invoke the SQLTransformer you have to add following to the
sitemap:
+ </p>
+<pre class="code">
+
+ <map:transform type="sql">
+ <map:parameter name="use-connection" value="personnel"/>
+ <map:parameter name="show-nr-of-rows" value="true"/>
+ <map:parameter name="clob-encoding" value="UTF-8"/>
+ </map:transform>
+ </pre>
+<p>
+ The <span class="codefrag">use-connection</span> parameter defines
which connection,
+ defined under the datasources element in <span
class="codefrag">cocoon.xconf</span>, the
+ SQLTransformer has to use to retrieve the data.
+ </p>
+<p>
+ The <span class="codefrag">show-nr-of-rows</span> instructs the
transformer to count the
+ number of rows in the resultset explicitly and to set the result as
+ attribute to the rowset element. This attribute is only useful in
+ combination with a sql statement, not with stored procedures. If a
+ stored procedure returns a resultset and you want to know how many
rows
+ it contains, you have to count the number of rows in another
transformer
+ or your stored procedure has to return it also (last solution is the
+ best one).
+ </p>
+<p>
+ The <span class="codefrag">clob-encoding</span> parameter defines
what encoding should be
+ used in getting content from CLOB columns.
+ </p>
+<p>The output XML will look as follows:</p>
+<pre class="code">
+
+ <page>
+ <title>Hello</title>
+ <content>
+ <para>This is my first Cocoon page filled with sql
data!</para>
+ <rowset nrofrows="2" name="department"
+ xmlns="http://apache.org/cocoon/SQL/2.0">
+ <row>
+ <id>1</id>
+ <name>Programmers</name>
+ </row>
+ <row>
+ <id>2</id>
+ <name>Loungers</name>
+ </row>
+ </rowset>
+ </content>
+ </page>
+ </pre>
+<p>
+ If you use this in combination with the <span
class="codefrag">simple-sql2html.xsl</span>
+ stylesheet,
+ </p>
+<pre class="code">
+
+ <map:transform src="stylesheets/simple-sql2html.xsl"/>
+ </pre>
+<p>you will get a more visually attractive page.</p>
+<p>See below for a more in depth example with stored procedures.</p>
+<p>
+ By now you should be able to use the SQLTransformer, but there are
some
+ more options you might find useful...
+ </p>
</div>
-
-
-<a name="N10082"></a><a name="Advanced+functionality"></a>
+
+<a name="N100A0"></a><a name="Advanced+functionality"></a>
<h3>Advanced functionality</h3>
<div style="margin-left: 0 ; border: 2px">
-<a name="N10087"></a><a name="Substitution"></a>
+<a name="N100A5"></a><a name="Substitution"></a>
<h4>Substitution</h4>
<div style="margin-left: 0 ; border: 2px">
<p>
-Sometimes you need more information before you can execute a query, eg. the
name
-of the user that is currently logged on your site. This information is only
-available at runtime and hence can only be substituted in the query when
-available.
-</p>
-<p>
-To pass this information to the SQL statement, the input XML has to look
like
-this:
-</p>
-<pre class="code">
-
- <page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
- <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
- <query>
- select id,name from employee_table where name =
'<sql:substitute-value
- sql:name="username"/>'
- </query>
- </execute-query>
- </page>
-
- </pre>
-<p>
-The substitution is done by the SQLTransformer before it executes the query
-(before it calls the method prepareStatement!). For this, the transformer
has to
-be given the necessary values via the sitemap (as parameter):
-</p>
-<pre class="code">
-
- <map:transform type="sql">
- <map:parameter name="use-connection" value="personnel"/>
- <map:parameter name="show-nr-of-rows" value="true"/>
- <map:parameter name="username" value="Stefano Mazzocchi"/>
- </map:transform>
-
- </pre>
-<p>
-Whenever the transformer encounters a 'substitute-value' element for which
the
-attribute 'name' contains the value 'username', it will replace this element
-with the value 'Stefano Mazzocchi' (without the single quotes!).
-</p>
-<p>
-The output XML will be as follow:
-</p>
-<pre class="code">
-
- <page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
- <rowset nrofrows="1" xmlns="http://apache.org/cocoon/SQL/2.0">
- <row>
- <id>2</id>
- <name>Stefano Mazzocchi</name>
- </row>
- </rowset>
- </page>
-
- </pre>
-<p>
-It is also possible to use substitution in combination with stored
procedures.
-</p>
+ Sometimes you need more information before you can execute a query,
+ e.g. the name of the user that is currently logged on your site.
This
+ information is only available at runtime and hence can only be
+ substituted in the query when available.
+ </p>
+<p>
+ To pass this information to the SQL statement, the input XML has to
+ look like this:
+ </p>
+<pre class="code">
+
+ <page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
+ <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
+ <query>
+ select id,name from employee_table where name =
+ '<sql:substitute-value sql:name="username"/>'
+ </query>
+ </execute-query>
+ </page>
+ </pre>
+<p>
+ The substitution is done by the SQLTransformer before it executes
the
+ query (before it calls the method <span
class="codefrag">prepareStatement</span>!). For
+ this, the transformer has to be given the necessary values via the
+ sitemap (as parameter):
+ </p>
+<pre class="code">
+
+ <map:transform type="sql">
+ <map:parameter name="use-connection" value="personnel"/>
+ <map:parameter name="show-nr-of-rows" value="true"/>
+ <map:parameter name="username" value="Stefano Mazzocchi"/>
+ </map:transform>
+ </pre>
+<p>
+ Whenever the transformer encounters a <span
class="codefrag">substitute-value</span>
+ element for which the attribute <span class="codefrag">name</span>
contains the value
+ <span class="codefrag">username</span>, it will replace this
element with the value
+ <span class="codefrag">Stefano Mazzocchi</span>.
+ </p>
+<p>The output XML will be as follow:</p>
+<pre class="code">
+
+ <page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
+ <rowset nrofrows="1" xmlns="http://apache.org/cocoon/SQL/2.0">
+ <row>
+ <id>2</id>
+ <name>Stefano Mazzocchi</name>
+ </row>
+ </rowset>
+ </page>
+ </pre>
+<p>
+ It is also possible to use substitution in combination with stored
+ procedures.
+ </p>
</div>
-<a name="N100AE"></a><a name="Ancestors"></a>
+<a name="N100DB"></a><a name="Ancestors"></a>
<h4>Ancestors</h4>
<div style="margin-left: 0 ; border: 2px">
-<p>
-This functionality is best described by a simple example.
-</p>
-<p>
-Take following input XML:
-</p>
+<p>This functionality is best described by a simple example.</p>
+<p>Take following input XML:</p>
<pre class="code">
-
- <page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
- <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
- <query name="department" >
- select id,name from department_table
- </query>
- <execute-query>
- <query name="employee">
- select id,name from employee_table where department_id =
-<ancestor-value
- sql:name="id" sql:level="1"/>
- </query>
- </execute-query>
- </execute-query>
- </page>
-
- </pre>
-<p>
-The first query will retrieve all id's and name's from the department_table
-table. For each id that comes from the department_table, the second query,
in
-which the 'ancestor-value' element will be replaced by the id, will be
executed.
-The above example will be transformed to the following XML:
-</p>
-<pre class="code">
-
- <page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
- <rowset nrofrows="2" name="department"
- xmlns="http://apache.org/cocoon/SQL/2.0">
+
+ <page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
+ <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
+ <query name="department">
+ select id,name from department_table
+ </query>
+ <execute-query>
+ <query name="employee">
+ select id,name from employee_table where department_id =
+ <ancestor-value sql:name="id" sql:level="1"/>
+ </query>
+ </execute-query>
+ </execute-query>
+ </page>
+ </pre>
+<p>
+ The first query will retrieve all <span
class="codefrag">id</span>'s and
+ <span class="codefrag">name</span>'s from the <span
class="codefrag">department_table</span> table. For
+ each <span class="codefrag">id</span> that comes from the
+ <span class="codefrag">department_table</span>, the second query,
in which the
+ <span class="codefrag">ancestor-value</span> element will be
replaced by the
+ <span class="codefrag">id</span>, will be executed. The above
example will be
+ transformed to the following XML:
+ </p>
+<pre class="code">
+
+ <page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
+ <rowset nrofrows="2" name="department"
+ xmlns="http://apache.org/cocoon/SQL/2.0">
+ <row>
+ <id>1</id>
+ <name>Programmers</name>
+ <rowset nrofrows="2" name="employee">
<row>
<id>1</id>
- <name>Programmers</name>
- <rowset nrofrows="2" name="employee">
- <row>
- <id>1</id>
- <name>Donald Ball</name>
- </row>
- <row>
- <id>2</id>
- <name>Stefano Mazzocchi</name>
- </row>
- </rowset>
+ <name>Donald Ball</name>
</row>
<row>
<id>2</id>
- <name>Loungers</name>
- <rowset nrofrows="1" name="employee">
- <row>
- <id>3</id>
- <name>Pierpaolo Fumagalli</name>
- </row>
- </rowset>
+ <name>Stefano Mazzocchi</name>
+ </row>
+ </rowset>
+ </row>
+ <row>
+ <id>2</id>
+ <name>Loungers</name>
+ <rowset nrofrows="1" name="employee">
+ <row>
+ <id>3</id>
+ <name>Pierpaolo Fumagalli</name>
</row>
</rowset>
- </page>
-
- </pre>
+ </row>
+ </rowset>
+ </page>
+ </pre>
</div>
-<a name="N100C7"></a><a name="in-+and+out-parameters"></a>
+<a name="N10109"></a><a name="in-+and+out-parameters"></a>
<h4>in- and out-parameters</h4>
<div style="margin-left: 0 ; border: 2px">
<p>
-Stored procedures can return data as a parameter. To make use of this
-functionality in java, you have to register these parameters as 'out
-parameters'. Since this information is application specific, the
SQLTransformer
-uses reflection to retrieve the data in the right format. For this, an extra
-element is needed in the input XML:
-</p>
-<pre class="code">
-
- <out-parameter sql:nr="1" sql:name="code"
-sql:type="java.sql.Types.INTEGER"/>
-
- </pre>
-<p>
-where:
-</p>
+ Stored procedures can return data as a parameter. To make use of
this
+ functionality in java, you have to register these parameters as
+ <em>out parameters</em>. Since this information is application
+ specific, the SQLTransformer uses reflection to retrieve the data
in
+ the right format. For this, an extra element is needed in the input
+ XML:
+ </p>
+<pre class="code">
+
+ <out-parameter sql:nr="1" sql:name="code"
+ sql:type="java.sql.Types.INTEGER"/>
+ </pre>
+<p>where:</p>
<ol>
-
-<li>
-nr:
-The targeted parameter number that will return data of a certain type.
-</li>
-
+
<li>
-type:
-The type of data that will be returned (defined in java.sql.Types or in
database
-specific drivers, eg oracle.jdbc.driver.OracleTypes). Once the stored
procedure
-returns data in the parameters, the stored procedure tries to process them.
If
-the returned parameter is an instance of ResultSet, it will be translated to
XML
-as we saw before. In all the other situations, the SQLTransformer will
convert
-the parameter to a string.
-</li>
-
+
+<strong>nr</strong>:
+ The targeted parameter number that will return data of a certain
+ type.
+ </li>
+
+<li>
+
+<strong>type</strong>:
+ The type of data that will be returned (defined in
+ <span class="codefrag">java.sql.Types</span> or in database
specific drivers, e.g.
+ <span class="codefrag">oracle.jdbc.driver.OracleTypes</span>).
Once the stored
+ procedure returns data in the parameters, the stored procedure
tries
+ to process them. If the returned parameter is an instance of
+ <span class="codefrag">ResultSet</span>, it will be translated
to XML as we saw
+ before. In all the other situations the SQLTransformer will
convert
+ the parameter to a string.
+ </li>
+
</ol>
<p>
-This is an example of how to call an oracle stored procedure and process it
with
-the SQLTransformer:
-</p>
-<pre class="code">
-
- <page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
- <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
- <query isstoredprocedure="true" name="namesearch">
- begin QUICK_SEARCH.FIND_NAME('<sql:substitute-value
- sql:name="username"/>',?,?,?); end;
- </query>
- <out-parameter sql:nr="1" sql:name="code"
- sql:type="java.sql.Types.INTEGER"/>
- <out-parameter sql:nr="2" sql:name="nrofrows"
- sql:type="java.sql.Types.INTEGER"/>
- <out-parameter sql:nr="3" sql:name="resultset"
- sql:type="oracle.jdbc.driver.OracleTypes.CURSOR"/>
- </execute-query>
- </page>
-
- </pre>
-<p>
-The SQLTransformer will create 3 elements, respectively 'code', 'nrofrows'
and
-'resultset' under the element 'namesearch'. Since the type
-oracle.jdbc.driver.OracleTypes.CURSOR' corresponds to a ResultSet, a
'rowset'
-element will be created, containing all the data of the resultset.
-It is also possible to use an 'in-parameter' element, eg. <in-parameter
-sql:nr="1" sql:value="1"/>.
-This functionality is only provided to be complete, because it is available
in
-java itself. You can also use the 'in-parameter' in combination with a SQL
-statement.
-Used in combination with an out-parameter, a ?-parameter can be an
in-parameter
-and an out-parameter at the same time.
-</p>
+ This is an example of how to call an oracle stored procedure and
+ process it with the SQLTransformer:
+ </p>
+<pre class="code">
+
+ <page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
+ <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
+ <query isstoredprocedure="true" name="namesearch">
+ begin QUICK_SEARCH.FIND_NAME('<sql:substitute-value
+ sql:name="username"/>',?,?,?); end;
+ </query>
+ <out-parameter sql:nr="1" sql:name="code"
+ sql:type="java.sql.Types.INTEGER"/>
+ <out-parameter sql:nr="2" sql:name="nrofrows"
+ sql:type="java.sql.Types.INTEGER"/>
+ <out-parameter sql:nr="3" sql:name="resultset"
+ sql:type="oracle.jdbc.driver.OracleTypes.CURSOR"/>
+ </execute-query>
+ </page>
+ </pre>
+<p>
+ The SQLTransformer will create 3 elements, respectively
+ <span class="codefrag">code</span>, <span
class="codefrag">nrofrows</span> and <span class="codefrag">resultset</span>
+ under the element <span class="codefrag">namesearch</span>. Since
the type
+ <span
class="codefrag">oracle.jdbc.driver.OracleTypes.CURSOR</span> corresponds to a
+ <span class="codefrag">ResultSet</span>, a <span
class="codefrag">rowset</span> element will be created,
+ containing all the data of the resultset. It is also possible to
use
+ an <em>in-parameter</em> element, e.g.
+ <span class="codefrag"><in-parameter sql:nr="1"
sql:value="1"/></span>. This
+ functionality is only provided to be complete, because it is
available
+ in Java itself. You can also use the <em>in-parameter</em> in
+ combination with a SQL statement. Used in combination with an
+ <em>out-parameter</em>, a <em>?-parameter</em> can be an
+ <em>in-parameter</em> and an <em>out-parameter</em> at the same
time.
+ </p>
</div>
</div>
-
-<a name="N100ED"></a><a name="Combined+with+other+transformers"></a>
+
+<a name="N1016B"></a><a name="Combined+with+other+transformers"></a>
<h3>Combined with other transformers</h3>
<div style="margin-left: 0 ; border: 2px">
-<a name="N100F2"></a><a name="Filtertransformer"></a>
+<a name="N10170"></a><a name="Filtertransformer"></a>
<h4>Filtertransformer</h4>
<div style="margin-left: 0 ; border: 2px">
<p>
-When you query a database and it returns too many rows too process at once,
you
-might want to take a block of elements, process this block and ignore the
rest
-for now. You can best compare it to a search on Google: they only return 10
-results in one time, for more results you have to click on another block
(page).
-It wouldn't be wise to process more than 10 elements in the pipeline if you
only
-need to display 10 elements.
-</p>
-<p>
-Assume that a query returns 56 row elements (by using the SQLTransformer)
and
-that you only want to display the first 10 elements:
-</p>
-<p>
-Output XML from the SQLTransformer:
-</p>
-<pre class="code">
-
- <rowset nrofrows="56" name="test"
-xmlns="http://apache.org/cocoon/SQL/2.0">
- <row>
- <!-- db record -->
- </row>
- <row>
- <!-- db record -->
- </row>
- <row>
- <!-- db record -->
- </row>
-
- ...
-
- <row>
- <!-- db record -->
- </row>
- </rowset>
-
- </pre>
-<p>
-By adding following lines to the sitemap, just under the SQLTransformer, you
-restrict the results to 10 elements in the first block:
-</p>
-<pre class="code">
-
- <map:transform type="filter">
- <map:parameter name="element-name" value="row"/>
- <map:parameter name="count" value="10"/>
- <map:parameter name="blocknr" value="1"/>
- </map:transform>
-
- </pre>
-<p>
-output XML:
-</p>
-<pre class="code">
-
- <rowset nrofrows="56" name="test"
-xmlns="http://apache.org/cocoon/SQL/2.0">
- <block id="1">
- <row>
- <!-- db record -->
- </row>
-
- <!-- total of 10 rows -->
-
- <row>
- <!-- db record -->
- </row>
- </block>
- <block id="2"/>
- <block id="3"/>
- <block id="4"/>
- <block id="5"/>
- <block id="6"/>
- </rowset>
-
- </pre>
-<p>
-To make it more dynamically, put something like {reqCount} and {reqBlock} in
the
-values for count and blocknr respectively. These can be parameters from the
-request and they can be passed to the sitemap with an action.
-</p>
-<p>
-The FilterTransformer is a standalone component, you don't need to use it in
-combination with the SQLTransformer.
-</p>
+ When you query a database and it returns too many rows to process
at
+ once, you might want to take a block of elements, process this
block
+ and ignore the rest for now. You can best compare it to a search on
+ Google: they only return 10 results in one time, for more results
you
+ have to click on another block (page). It wouldn't be wise to
process
+ more than 10 elements in the pipeline if you only need to display
10
+ elements.
+ </p>
+<p>
+ Assume that a query returns 56 row elements (by using the
+ SQLTransformer) and that you only want to display the first 10
+ elements:
+ </p>
+<p>Output XML from the SQLTransformer:</p>
+<pre class="code">
+
+ <rowset nrofrows="56" name="test"
+ xmlns="http://apache.org/cocoon/SQL/2.0">
+ <row>
+ <!-- db record -->
+ </row>
+ <row>
+ <!-- db record -->
+ </row>
+
+ ...
+
+ <row>
+ <!-- db record -->
+ </row>
+ </rowset>
+ </pre>
+<p>
+ By adding following lines to the sitemap, just under the
+ SQLTransformer, you restrict the results to 10 elements in the
first
+ block:
+ </p>
+<pre class="code">
+
+ <map:transform type="filter">
+ <map:parameter name="element-name" value="row"/>
+ <map:parameter name="count" value="10"/>
+ <map:parameter name="blocknr" value="1"/>
+ </map:transform>
+ </pre>
+<p>output XML:</p>
+<pre class="code">
+
+ <rowset nrofrows="56" name="test"
+ xmlns="http://apache.org/cocoon/SQL/2.0">
+ <block id="1">
+ <row>
+ <!-- db record -->
+ </row>
+
+ <!-- total of 10 rows -->
+
+ <row>
+ <!-- db record -->
+ </row>
+ </block>
+ <block id="2"/>
+ <block id="3"/>
+ <block id="4"/>
+ <block id="5"/>
+ <block id="6"/>
+ </rowset>
+ </pre>
+<p>
+ To make it more dynamically, put something like
+ <span class="codefrag">{reqCount}</span> and <span
class="codefrag">{reqBlock}</span> in the values for
+ <em>count</em> and <em>blocknr</em> respectively. These can be
+ parameters from the request and they can be passed to the sitemap
with
+ an action.
+ </p>
+<p>
+ The FilterTransformer is a standalone component; you don't need to
use
+ it in combination with the SQLTransformer.
+ </p>
</div>
-<a name="N1011C"></a><a name="WriteDOMSessionTransformer"></a>
+<a name="N101A6"></a><a name="WriteDOMSessionTransformer"></a>
<h4>WriteDOMSessionTransformer</h4>
<div style="margin-left: 0 ; border: 2px">
<p>
-If you only use the FilterTransformer in combination with the
SQLTransformer,
-you have to query the database each time the user wants to see another part
of
-the result. You can better store the result in the session after the first
-request and retrieve the result from the session for the subsequent
requests.
-This can be done by using a selector, which checks if the data is available
in
-the session or not.
-</p>
-<p>
-WriteDOMSessionTransformer can build a DOM starting from a given element
(which
-will be the root of the DOM tree) and store it in the session. If you want
to
-store the result of a query, you have to add following to the sitemap:
-</p>
-<pre class="code">
-
- <map:transform type="writeDOMsession">
- <map:parameter name="dom-name" value="DBresult"/>
- <map:parameter name="dom-root-element" value="rowset"/>
- </map:transform>
-
- </pre>
-<p>
-The transformer will build a DOM tree with rowset as root element and will
store
-it in the session with the name "DBresult".
-</p>
-<p>
-Note: most of the times, it is not smart to keep the output XML of the
-SQLTransformer in the session. Check if it is better to do the necessary
-transformations first, so that you get a smaller DOM, and then put the
result in
-the session. You probably will be able to use the FilterTransformer on the
-transformed XML also.
-</p>
-<p>
-The WriteDOMSessionTransformer is a standalone component, you don't need to
use
-it in combination with the SQLTransformer.
-</p>
+ If you only use the FilterTransformer in combination with the
+ SQLTransformer, you have to query the database each time the user
+ wants to see another part of the result. You can better store the
+ result in the session after the first request and retrieve the
result
+ from the session for the subsequent requests. This can be done by
+ using a selector, which checks if the data is available in the
session
+ or not.
+ </p>
+<p>
+ WriteDOMSessionTransformer can build a DOM starting from a given
+ element (which will be the root of the DOM tree) and store it in
the
+ session. If you want to store the result of a query, you have to
add
+ following to the sitemap:
+ </p>
+<pre class="code">
+
+ <map:transform type="writeDOMsession">
+ <map:parameter name="dom-name" value="DBresult"/>
+ <map:parameter name="dom-root-element" value="rowset"/>
+ </map:transform>
+ </pre>
+<p>
+ The transformer will build a DOM tree with <span
class="codefrag">rowset</span> as root
+ element and will store it in the session with the name
+ <span class="codefrag">DBresult</span>.
+ </p>
+<div class="frame note">
+<div class="label">Note</div>
+<div class="content">
+ Most of the times, it is not smart to keep the output XML of the
+ SQLTransformer in the session. Check if it is better to do the
+ necessary transformations first, so that you get a smaller DOM, and
+ then put the result in the session. You probably will be able to
use
+ the FilterTransformer on the transformed XML also.
+ </div>
+</div>
+<p>
+ The WriteDOMSessionTransformer is a standalone component, you don't
+ need to use it in combination with the SQLTransformer.
+ </p>
</div>
-<a name="N10136"></a><a name="ReadDOMSessionTransformer"></a>
+<a name="N101C6"></a><a name="ReadDOMSessionTransformer"></a>
<h4>ReadDOMSessionTransformer</h4>
<div style="margin-left: 0 ; border: 2px">
<p>
-Simply transforms a DOM to SAX-events, which can be used further on in the
-pipeline. Once you stored the result of a query in the session with the
-WriteDOMSessionTransformer, you can read it again with the
-ReadDOMSessionTransformer:
-</p>
-<pre class="code">
-
- <map:transform type="readDOMsession">
- <map:parameter name="dom-name" value="DBresult"/>
- <map:parameter name="trigger-element" value="users"/>
- <map:parameter name="position" value="after"/>
- </map:transform>
-
- </pre>
-<p>
-In this example, the SAX-events that came from the DOM tree that is stored
in
-the session with name DBresult will be added after the users element. This
means
-as soon that the transformer encounters the end-element 'users', it will
start
-to generate SAX-events from the DOM tree. There are three possible
positions,
-'before','in' and 'after':
-</p>
+ Simply transforms a DOM to SAX events, which can be used further
on in
+ the pipeline. Once you stored the result of a query in the session
+ with the WriteDOMSessionTransformer, you can read it again with the
+ ReadDOMSessionTransformer:
+ </p>
+<pre class="code">
+
+ <map:transform type="readDOMsession">
+ <map:parameter name="dom-name" value="DBresult"/>
+ <map:parameter name="trigger-element" value="users"/>
+ <map:parameter name="position" value="after"/>
+ </map:transform>
+ </pre>
+<p>
+ In this example the SAX events, that come from the DOM tree stored
in
+ the session with name <span class="codefrag">DBresult</span>, will
be added after the
+ <span class="codefrag">users</span> element. This means as soon
that the transformer
+ encounters the end element <span class="codefrag">users</span>, it
will start to
+ generate SAX events from the DOM tree. There are three possible
+ positions, <span class="codefrag">before</span>, <span
class="codefrag">in</span> and
+ <span class="codefrag">after</span>:
+ </p>
<ol>
-
-<li>'before' means that when the transformer encounters the 'users' element,
it
-will FIRST translate the DOM tree to SAX-events and THEN it will continue to
-forward the other SAX-events (starting with 'users').
-</li>
-
-<li>'in' means that the transformer will forward the startElement event for
-'users' and that it IMMEDIATELY starts to generate SAX-events from the
DOM-tree.
-After that, it will continue to forward the child elements of users and then
all
-the other elements.
-</li>
-
-<li>'after' means that the transformer starts to generate SAX-events from
the
-DOM-tree just after it has forwarded the end-element 'users'.
-</li>
-
+
+<li>
+
+<strong><span class="codefrag">before</span></strong> means that when the
transformer
+ encounters the <span class="codefrag">users</span> element, it
will FIRST translate
+ the DOM tree to SAX events and THEN it will continue to forward
the
+ other SAX events (starting with <span
class="codefrag">users</span>).
+ </li>
+
+<li>
+
+<strong><span class="codefrag">in</span></strong> means that the transformer
will
+ forward the start element event for <span
class="codefrag">users</span> and that it
+ IMMEDIATELY starts to generate SAX events from the DOM tree.
After
+ that, it will continue to forward the child elements of users and
+ then all the other elements.
+ </li>
+
+<li>
+
+<strong><span class="codefrag">after</span></strong> means that the
transformer
+ starts to generate SAX events from the DOM tree just after it has
+ forwarded the end element <span class="codefrag">users</span>.
+ </li>
+
</ol>
<p>
-The ReadDOMSessionTransformer is a standalone component, you don't need to
use
-it in combination with the WriteDOMSessionTransformer.
-</p>
+ The ReadDOMSessionTransformer is a standalone component, you don't
+ need to use it in combination with the WriteDOMSessionTransformer.
+ </p>
</div>
-<p>
-That's it,
-</p>
-<p>
-Sven Beauprez
-</p>
+<p>That's it,</p>
+<p>Sven Beauprez</p>
</div>
-
-
+
<div class="attribution">by Sven Beauprez, Davanum Srinivas; <span
class="version">0.9</span>
</div>
</div>
1.4 +145 -146
cocoon-site/site/2.1/userdocs/transformers/sql-transformer.pdf
<<Binary file>>
1.9 +29 -3
cocoon-site/site/2.1/userdocs/transformers/transformers.html
Index: transformers.html
===================================================================
RCS file:
/home/cvs/cocoon-site/site/2.1/userdocs/transformers/transformers.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- transformers.html 12 Oct 2003 16:39:54 -0000 1.8
+++ transformers.html 16 Oct 2003 22:08:21 -0000 1.9
@@ -98,89 +98,115 @@
<li>
<font color="#CFDCED">Navigation</font>
<ul>
+
<li>
<a href="../../index.html">Main</a>
</li>
+
<li>
<a href="../index.html">User Documentation</a>
</li>
+
</ul>
</li>
<li>
<font color="#CFDCED">Transformers</font>
<ul>
+
<li>
<span class="sel"><font color="#ffcc00">Overview</font></span>
</li>
+
</ul>
</li>
<li>
<font color="#CFDCED">Default</font>
<ul>
+
<li>
<a href="xslt-transformer.html">XSLT Transformer</a>
</li>
+
</ul>
</li>
<li>
<font color="#CFDCED">Core</font>
<ul>
+
<li>
<a href="extractor-transformer.html">Fragment Extractor Transformer</a>
</li>
+
<li>
<a href="i18n-transformer.html">I18n Transformer</a>
</li>
+
<li>
<a href="log-transformer.html">Log Transformer</a>
</li>
-<li>
-<a href="sql-transformer.html">SQL Transformer</a>
-</li>
+
<li>
<a href="filter-transformer.html">Filter Transformer</a>
</li>
+
<li>
<a href="readdomsession-transformer.html">Read DOM Session Transformer</a>
</li>
+
<li>
<a href="writedomsession-transformer.html">Write DOM Session Transformer</a>
</li>
+
<li>
<a href="xinclude-transformer.html">XInclude Transformer</a>
</li>
+
<li>
<a href="cinclude-transformer.html">CInclude Transformer</a>
</li>
+
<li>
<a href="encodeurl-transformer.html">EncodeURL Transformer</a>
</li>
+
<li>
<a href="sourcewriting-transformer.html">SourceWriting Transformer</a>
</li>
+
<li>
<a href="augment-transformer.html">Augment Transformer</a>
</li>
+
</ul>
</li>
<li>
<font color="#CFDCED">Optional</font>
<ul>
+
<li>
<a href="ldap-transformer.html">LDAP Transformer</a>
</li>
+
<li>
<a href="lexer-transformer.html">Lexical Transformer</a>
</li>
+
<li>
<a href="parser-transformer.html">Parser Transformer</a>
</li>
+
<li>
<a href="pattern-transformer.html">Pattern Transformer</a>
</li>
+
<li>
<a href="../../developing/webapps/contexts.html">Session Transformer</a>
</li>
+
+<li>
+<a href="sql-transformer.html">SQL Transformer</a>
+</li>
+
</ul>
</li>
</ul>
1.4 +82 -82
cocoon-site/site/2.1/userdocs/transformers/transformers.pdf
<<Binary file>>
1.8 +29 -3
cocoon-site/site/2.1/userdocs/transformers/writedomsession-transformer.html
Index: writedomsession-transformer.html
===================================================================
RCS file:
/home/cvs/cocoon-site/site/2.1/userdocs/transformers/writedomsession-transformer.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- writedomsession-transformer.html 12 Oct 2003 16:39:54 -0000 1.7
+++ writedomsession-transformer.html 16 Oct 2003 22:08:21 -0000 1.8
@@ -98,89 +98,115 @@
<li>
<font color="#CFDCED">Navigation</font>
<ul>
+
<li>
<a href="../../index.html">Main</a>
</li>
+
<li>
<a href="../index.html">User Documentation</a>
</li>
+
</ul>
</li>
<li>
<font color="#CFDCED">Transformers</font>
<ul>
+
<li>
<a href="transformers.html">Overview</a>
</li>
+
</ul>
</li>
<li>
<font color="#CFDCED">Default</font>
<ul>
+
<li>
<a href="xslt-transformer.html">XSLT Transformer</a>
</li>
+
</ul>
</li>
<li>
<font color="#CFDCED">Core</font>
<ul>
+
<li>
<a href="extractor-transformer.html">Fragment Extractor Transformer</a>
</li>
+
<li>
<a href="i18n-transformer.html">I18n Transformer</a>
</li>
+
<li>
<a href="log-transformer.html">Log Transformer</a>
</li>
-<li>
-<a href="sql-transformer.html">SQL Transformer</a>
-</li>
+
<li>
<a href="filter-transformer.html">Filter Transformer</a>
</li>
+
<li>
<a href="readdomsession-transformer.html">Read DOM Session Transformer</a>
</li>
+
<li>
<span class="sel"><font color="#ffcc00">Write DOM Session
Transformer</font></span>
</li>
+
<li>
<a href="xinclude-transformer.html">XInclude Transformer</a>
</li>
+
<li>
<a href="cinclude-transformer.html">CInclude Transformer</a>
</li>
+
<li>
<a href="encodeurl-transformer.html">EncodeURL Transformer</a>
</li>
+
<li>
<a href="sourcewriting-transformer.html">SourceWriting Transformer</a>
</li>
+
<li>
<a href="augment-transformer.html">Augment Transformer</a>
</li>
+
</ul>
</li>
<li>
<font color="#CFDCED">Optional</font>
<ul>
+
<li>
<a href="ldap-transformer.html">LDAP Transformer</a>
</li>
+
<li>
<a href="lexer-transformer.html">Lexical Transformer</a>
</li>
+
<li>
<a href="parser-transformer.html">Parser Transformer</a>
</li>
+
<li>
<a href="pattern-transformer.html">Pattern Transformer</a>
</li>
+
<li>
<a href="../../developing/webapps/contexts.html">Session Transformer</a>
</li>
+
+<li>
+<a href="sql-transformer.html">SQL Transformer</a>
+</li>
+
</ul>
</li>
</ul>
1.4 +19 -19
cocoon-site/site/2.1/userdocs/transformers/writedomsession-transformer.pdf
<<Binary file>>
1.8 +3 -3
cocoon-site/site/2.1/userdocs/transformers/xinclude-transformer.html
Index: xinclude-transformer.html
===================================================================
RCS file:
/home/cvs/cocoon-site/site/2.1/userdocs/transformers/xinclude-transformer.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- xinclude-transformer.html 12 Oct 2003 16:39:54 -0000 1.7
+++ xinclude-transformer.html 16 Oct 2003 22:08:21 -0000 1.8
@@ -135,9 +135,6 @@
<a href="log-transformer.html">Log Transformer</a>
</li>
<li>
-<a href="sql-transformer.html">SQL Transformer</a>
-</li>
-<li>
<a href="filter-transformer.html">Filter Transformer</a>
</li>
<li>
@@ -180,6 +177,9 @@
</li>
<li>
<a href="../../developing/webapps/contexts.html">Session Transformer</a>
+</li>
+<li>
+<a href="sql-transformer.html">SQL Transformer</a>
</li>
</ul>
</li>
1.4 +24 -24
cocoon-site/site/2.1/userdocs/transformers/xinclude-transformer.pdf
<<Binary file>>
1.9 +3 -29
cocoon-site/site/2.1/userdocs/transformers/xslt-transformer.html
Index: xslt-transformer.html
===================================================================
RCS file:
/home/cvs/cocoon-site/site/2.1/userdocs/transformers/xslt-transformer.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- xslt-transformer.html 12 Oct 2003 16:39:54 -0000 1.8
+++ xslt-transformer.html 16 Oct 2003 22:08:21 -0000 1.9
@@ -98,115 +98,89 @@
<li>
<font color="#CFDCED">Navigation</font>
<ul>
-
<li>
<a href="../../index.html">Main</a>
</li>
-
<li>
<a href="../index.html">User Documentation</a>
</li>
-
</ul>
</li>
<li>
<font color="#CFDCED">Transformers</font>
<ul>
-
<li>
<a href="transformers.html">Overview</a>
</li>
-
</ul>
</li>
<li>
<font color="#CFDCED">Default</font>
<ul>
-
<li>
<span class="sel"><font color="#ffcc00">XSLT Transformer</font></span>
</li>
-
</ul>
</li>
<li>
<font color="#CFDCED">Core</font>
<ul>
-
<li>
<a href="extractor-transformer.html">Fragment Extractor Transformer</a>
</li>
-
<li>
<a href="i18n-transformer.html">I18n Transformer</a>
</li>
-
<li>
<a href="log-transformer.html">Log Transformer</a>
</li>
-
-<li>
-<a href="sql-transformer.html">SQL Transformer</a>
-</li>
-
<li>
<a href="filter-transformer.html">Filter Transformer</a>
</li>
-
<li>
<a href="readdomsession-transformer.html">Read DOM Session Transformer</a>
</li>
-
<li>
<a href="writedomsession-transformer.html">Write DOM Session Transformer</a>
</li>
-
<li>
<a href="xinclude-transformer.html">XInclude Transformer</a>
</li>
-
<li>
<a href="cinclude-transformer.html">CInclude Transformer</a>
</li>
-
<li>
<a href="encodeurl-transformer.html">EncodeURL Transformer</a>
</li>
-
<li>
<a href="sourcewriting-transformer.html">SourceWriting Transformer</a>
</li>
-
<li>
<a href="augment-transformer.html">Augment Transformer</a>
</li>
-
</ul>
</li>
<li>
<font color="#CFDCED">Optional</font>
<ul>
-
<li>
<a href="ldap-transformer.html">LDAP Transformer</a>
</li>
-
<li>
<a href="lexer-transformer.html">Lexical Transformer</a>
</li>
-
<li>
<a href="parser-transformer.html">Parser Transformer</a>
</li>
-
<li>
<a href="pattern-transformer.html">Pattern Transformer</a>
</li>
-
<li>
<a href="../../developing/webapps/contexts.html">Session Transformer</a>
</li>
-
+<li>
+<a href="sql-transformer.html">SQL Transformer</a>
+</li>
</ul>
</li>
</ul>
1.4 +20 -20
cocoon-site/site/2.1/userdocs/transformers/xslt-transformer.pdf
<<Binary file>>