Author: vgritsenko
Date: Tue May 3 11:22:14 2005
New Revision: 167951
URL: http://svn.apache.org/viewcvs?rev=167951&view=rev
Log:
Remove duplicate HSQLDB database from databases block.
Remove duplicate samples schema from databases block.
Link samples to samples schema in hsqldb block.
Fix namespaces in sql transformer example.
Added:
cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/build.xml
- copied, changed from r165647,
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/build.xml
cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/conf/cocoondb.properties
- copied unchanged from r165647,
cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/samples/WEB-INF/db/cocoondb.properties
cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/conf/cocoondb.script
- copied, changed from r165647,
cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/samples/WEB-INF/db/cocoondb.script
cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/conf/schema.sql
- copied, changed from r165647,
cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/samples/WEB-INF/db/tutorial.sql
Removed:
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/build.xml
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/conf/cocoondb.properties
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/conf/cocoondb.script
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/transform/sql-page.xml.sql
cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/samples/
Modified:
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/mod-db/edit-groups.xsp
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/mod-db/file-upload-blob.xsp
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/mod-db/schema.sql
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/mod-db/user-list.xsp
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/add-department.xsp
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/add-employee.xsp
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/employee.xsp
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/process-department.xsp
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/process-employee.xsp
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/sitemap.xmap
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/sitemap.xmap
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/stylesheets/sql2html.xsl
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/transform/sitemap.xmap
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/transform/sql-page.xml
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/xsp/esql.xsp
Modified:
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/mod-db/edit-groups.xsp
URL:
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/mod-db/edit-groups.xsp?rev=167951&r1=167950&r2=167951&view=diff
==============================================================================
---
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/mod-db/edit-groups.xsp
(original)
+++
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/mod-db/edit-groups.xsp
Tue May 3 11:22:14 2005
@@ -15,32 +15,29 @@
limitations under the License.
-->
-<xsp:page
- language="java"
+<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
- xmlns:esql="http://apache.org/cocoon/SQL/v2"
- xmlns:xsp-request="http://apache.org/xsp/request/2.0"
- >
- <!--
- -->
+ xmlns:esql="http://apache.org/cocoon/SQL/v2"
+ xmlns:xsp-request="http://apache.org/xsp/request/2.0">
+
<xsp:structure>
<xsp:include>java.util.Enumeration</xsp:include>
</xsp:structure>
-
+
<page>
<resources>
<resource type="file"
href="database.xml?cocoon-view=pretty-content">Descriptor</resource>
- <resource type="file" href="schema.sql">Schema</resource>
+ <resource type="file" href="../schema.sql">Schema</resource>
<resource type="doc"
href="userdocs/actions/database-actions.html">Actions</resource>
<resource type="doc" href="userdocs/xsp/esql.html">ESQL</resource>
</resources>
<title>edit-groups</title>
-
+
<esql:connection>
<esql:pool>personnel</esql:pool>
-
+
<xsp:logic>
String user = <xsp-request:get-parameter name="user.uid"/>;
if ( user == null ) {
@@ -71,7 +68,7 @@
</esql:row-results>
</esql:results>
</esql:execute-query>
- }
+ }
</xsp:logic>
@@ -129,7 +126,7 @@
<esql:query>select gid, gname from
user_groups, groups where user_groups.gid = groups.gid and uid=<esql:parameter
type="int"><xsp:expr>uid</xsp:expr></esql:parameter> order by gname</esql:query>
<esql:results>
<esql:row-results>
- <option>
+ <option>
<xsp:attribute
name="value"><esql:get-string column="gid"/></xsp:attribute>
<esql:get-string column="gname"/>
</option>
@@ -173,7 +170,7 @@
<esql:query>select gid, gname from groups
where gid not in (select gid from user_groups where uid=<esql:parameter
type="int"><xsp:expr>uid</xsp:expr></esql:parameter>) order by
gname</esql:query>
<esql:results>
<esql:row-results>
- <option>
+ <option>
<xsp:attribute
name="value"><esql:get-string column="gid"/></xsp:attribute>
<esql:get-string column="gname"/>
</option>
Modified:
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/mod-db/file-upload-blob.xsp
URL:
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/mod-db/file-upload-blob.xsp?rev=167951&r1=167950&r2=167951&view=diff
==============================================================================
---
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/mod-db/file-upload-blob.xsp
(original)
+++
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/mod-db/file-upload-blob.xsp
Tue May 3 11:22:14 2005
@@ -24,11 +24,11 @@
<xsp:structure>
<xsp:include>java.util.Enumeration</xsp:include>
</xsp:structure>
-
+
<page>
<resources>
<resource type="file"
href="database.xml?cocoon-view=pretty-content">Descriptor</resource>
- <resource type="file" href="schema.sql">Schema</resource>
+ <resource type="file" href="../schema.sql">Schema</resource>
<resource type="doc"
href="userdocs/actions/database-actions.html">Actions</resource>
<resource type="doc" href="userdocs/xsp/esql.html">ESQL</resource>
</resources>
@@ -36,12 +36,12 @@
<title>file-upload-blob</title>
<!-- create image tags out of the images stored in the database, the
browser will subsequently
- request those images and they will be served by a special pipeline in
the sitemap using
+ request those images and they will be served by a special pipeline in
the sitemap using
the database reader component
- -->
+ -->
<esql:connection>
<esql:pool>personnel</esql:pool>
-
+
<esql:execute-query>
<esql:query>select media.id from media</esql:query>
<esql:results>
@@ -53,17 +53,17 @@
<esql:no-results>no images yet</esql:no-results>
</esql:execute-query>
</esql:connection>
-
+
<h1>Upload Media</h1>
- <p>What's happening? This example interacts with a simple database
schema, set up by
- default in the sample "personnel" hsql database installed with the
database block. There
- is one table "media" with two fields: a primary key, and a binary field
"image".
- When a file upload is received from the simple form on this page, the
modular db action
+ <p>What's happening? This example interacts with a simple database
schema, set up by
+ default in the sample "personnel" hsql database installed with the
database block. There
+ is one table "media" with two fields: a primary key, and a binary field
"image".
+ When a file upload is received from the simple form on this page, the
modular db action
auto increments the primary key, and loads the binary file contents into
the column (declared
as type="binary" in database.xml). That's it.</p>
- <p>Additionally, when this page is loaded, esql queries the media table
and places an image tag
- for each row, using "primarykeyvalue".jpg for the src. The sitemap is
configured to serve
+ <p>Additionally, when this page is loaded, esql queries the media table
and places an image tag
+ for each row, using "primarykeyvalue".jpg for the src. The sitemap is
configured to serve
*.jpg using the database reader (declared in the root database
samples sitemap) which simply
retrieves the binary data from the database and streams it to the
browser.</p>
Modified:
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/mod-db/schema.sql
URL:
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/mod-db/schema.sql?rev=167951&r1=167950&r2=167951&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/mod-db/schema.sql
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/mod-db/schema.sql
Tue May 3 11:22:14 2005
@@ -1,5 +1,3 @@
-
-
# Copyright 1999-2004 The Apache Software Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -47,4 +45,3 @@
mimetype varchar(50),
primary key (id)
);
-
Modified:
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/mod-db/user-list.xsp
URL:
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/mod-db/user-list.xsp?rev=167951&r1=167950&r2=167951&view=diff
==============================================================================
---
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/mod-db/user-list.xsp
(original)
+++
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/mod-db/user-list.xsp
Tue May 3 11:22:14 2005
@@ -16,32 +16,28 @@
-->
<xsp:page language="java"
- xmlns:xsp="http://apache.org/xsp"
- xmlns:esql="http://apache.org/cocoon/SQL/v2"
- xmlns:xsp-request="http://apache.org/xsp/request/2.0"
->
+ xmlns:xsp="http://apache.org/xsp"
+ xmlns:esql="http://apache.org/cocoon/SQL/v2"
+ xmlns:xsp-request="http://apache.org/xsp/request/2.0">
<xsp:structure>
<xsp:include>java.util.Enumeration</xsp:include>
</xsp:structure>
-
- <page>
+ <page>
<resources>
<resource type="file"
href="database.xml?cocoon-view=pretty-content">Descriptor</resource>
- <resource type="file" href="schema.sql">Schema</resource>
+ <resource type="file" href="../schema.sql">Schema</resource>
<resource type="doc"
href="userdocs/actions/database-actions.html">Actions</resource>
<resource type="doc" href="userdocs/xsp/esql.html">ESQL</resource>
</resources>
<title>user-list</title>
-
- <content>
-
- <h1>Modular Database Actions</h1>
+ <content>
+ <h1>Modular Database Actions</h1>
- <hr/>
+ <hr/>
<p>The intention is to factor out those parts that are dependent on
the utilised DBMS as well as the methods used to obtain the values
@@ -50,7 +46,7 @@
<ol>
<li>Input Modules read data from some source (e.g. the request
- object or session attributes or whatever)</li>
+ object or session attributes or whatever)</li>
<li>Output Modules send the data to an arbitrary
destination. Again, this could be request attributes or
@@ -71,16 +67,16 @@
<h2>Current database content</h2>
- <esql:connection>
+ <esql:connection>
<esql:pool>personnel</esql:pool>
-
+
<p>
<sqltbl>
<esql:execute-query>
<esql:query>select * from user order by name, firstname, uname,
uid</esql:query>
<esql:results>
<esql:row-results>
-
+
<sqltblrow>
<name>
<esql:get-string column="name"/>
@@ -106,7 +102,7 @@
</form>
</action>
</sqltblrow>
-
+
</esql:row-results>
</esql:results>
<esql:error-results>
@@ -136,7 +132,7 @@
<esql:query>select gid, gname from groups order by
gname</esql:query>
<esql:results>
<esql:row-results>
- <option>
+ <option>
<xsp:attribute name="value"><esql:get-string
column="gid"/></xsp:attribute>
<esql:get-string column="gname"/>
</option>
@@ -146,7 +142,7 @@
</select>
<input type="submit" name="add-user-groups" value="new
user"/>
</action>
- </sqltblrow>
+ </sqltblrow>
</form>
</sqltbl>
</p>
@@ -221,7 +217,7 @@
</form>
</p>
</esql:connection>
-
+
<hr/>
@@ -268,7 +264,7 @@
</p>
<hr/>
-
+
</content>
</page>
</xsp:page>
Modified:
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/add-department.xsp
URL:
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/add-department.xsp?rev=167951&r1=167950&r2=167951&view=diff
==============================================================================
---
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/add-department.xsp
(original)
+++
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/add-department.xsp
Tue May 3 11:22:14 2005
@@ -15,28 +15,24 @@
limitations under the License.
-->
-<xsp:page
- language="java"
- xmlns:xsp="http://apache.org/xsp"
->
-
+<xsp:page language="java"
+ xmlns:xsp="http://apache.org/xsp">
<page>
-
<resources>
- <resource type="file"
href="employee.xml?cocoon-view=pretty-content">Descriptor</resource>
- <resource type="file"
href="../transform/sql-page.xml.sql">Schema</resource>
- <resource type="doc"
href="userdocs/actions/database-actions.html">Actions</resource>
- <resource type="doc" href="userdocs/xsp/esql.html">ESQL</resource>
+ <resource type="file"
href="employee.xml?cocoon-view=pretty-content">Descriptor</resource>
+ <resource type="file" href="../schema.sql">Schema</resource>
+ <resource type="doc"
href="userdocs/actions/database-actions.html">Actions</resource>
+ <resource type="doc" href="userdocs/xsp/esql.html">ESQL</resource>
</resources>
- <title>Add a Department</title>
+ <title>Add a Department</title>
- <content>
- <form action="process-department" method="POST">
- <input name="process" type="hidden" value="Add"/>
- <para>Department Name: <input name="name" type="text"/></para>
- <input type="submit" value="Add"/>
- </form>
- </content>
+ <content>
+ <form action="process-department" method="POST">
+ <input name="process" type="hidden" value="Add"/>
+ <para>Department Name: <input name="name" type="text"/></para>
+ <input type="submit" value="Add"/>
+ </form>
+ </content>
</page>
</xsp:page>
Modified:
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/add-employee.xsp
URL:
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/add-employee.xsp?rev=167951&r1=167950&r2=167951&view=diff
==============================================================================
---
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/add-employee.xsp
(original)
+++
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/add-employee.xsp
Tue May 3 11:22:14 2005
@@ -15,41 +15,39 @@
limitations under the License.
-->
-<xsp:page
- language="java"
+<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
- xmlns:esql="http://apache.org/cocoon/SQL/v2"
->
+ xmlns:esql="http://apache.org/cocoon/SQL/v2">
<page>
-
<resources>
- <resource type="file"
href="employee.xml?cocoon-view=pretty-content">Descriptor</resource>
- <resource type="file"
href="../transform/sql-page.xml.sql">Schema</resource>
- <resource type="doc"
href="userdocs/actions/database-actions.html">Actions</resource>
- <resource type="doc" href="userdocs/xsp/esql.html">ESQL</resource>
+ <resource type="file"
href="employee.xml?cocoon-view=pretty-content">Descriptor</resource>
+ <resource type="file" href="../schema.sql">Schema</resource>
+ <resource type="doc"
href="userdocs/actions/database-actions.html">Actions</resource>
+ <resource type="doc" href="userdocs/xsp/esql.html">ESQL</resource>
</resources>
<title>Add an Employee</title>
+
<content>
<form action="process-employee" method="POST">
<input name="process" type="hidden" value="Add"/>
<para>Employee Name: <input name="name" type="text"/></para>
<para>Department:
<select name="department">
- <esql:connection>
- <esql:pool>personnel</esql:pool>
- <esql:execute-query>
- <esql:query>select id, name from department order by
name</esql:query>
- <esql:results>
- <esql:row-results>
- <option>
- <xsp:attribute name="value"><esql:get-int
column="id"/></xsp:attribute>
- <esql:get-string column="name"/>
- </option>
- </esql:row-results>
- </esql:results>
- </esql:execute-query>
- </esql:connection>
+ <esql:connection>
+ <esql:pool>personnel</esql:pool>
+ <esql:execute-query>
+ <esql:query>select id, name from department order by
name</esql:query>
+ <esql:results>
+ <esql:row-results>
+ <option>
+ <xsp:attribute name="value"><esql:get-int
column="id"/></xsp:attribute>
+ <esql:get-string column="name"/>
+ </option>
+ </esql:row-results>
+ </esql:results>
+ </esql:execute-query>
+ </esql:connection>
</select>
</para>
<input type="submit" value="Add"/>
Modified:
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/employee.xsp
URL:
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/employee.xsp?rev=167951&r1=167950&r2=167951&view=diff
==============================================================================
---
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/employee.xsp
(original)
+++
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/employee.xsp
Tue May 3 11:22:14 2005
@@ -15,11 +15,9 @@
limitations under the License.
-->
-<xsp:page
- language="java"
+<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
- xmlns:esql="http://apache.org/cocoon/SQL/v2"
->
+ xmlns:esql="http://apache.org/cocoon/SQL/v2">
<page>
<xsp:logic>
String empID = request.getParameter("employee");
@@ -29,52 +27,53 @@
</xsp:logic>
<resources>
- <resource type="file"
href="employee.xml?cocoon-view=pretty-content">Descriptor</resource>
- <resource type="file"
href="../transform/sql-page.xml.sql">Schema</resource>
- <resource type="doc"
href="userdocs/actions/database-actions.html">Actions</resource>
- <resource type="doc" href="userdocs/xsp/esql.html">ESQL</resource>
+ <resource type="file"
href="employee.xml?cocoon-view=pretty-content">Descriptor</resource>
+ <resource type="file" href="../schema.sql">Schema</resource>
+ <resource type="doc"
href="userdocs/actions/database-actions.html">Actions</resource>
+ <resource type="doc" href="userdocs/xsp/esql.html">ESQL</resource>
</resources>
<title>Manage Employees</title>
<para style="backgroud-color:#ff0000"><xsp:expr>(message ==
null?"":message)</xsp:expr></para>
<content>
<form name="EmployeeSelection">
- <select size="1" name="employee"
- onChange="top.location.href=window.location.pathname +
'?employee=' +
document.forms['EmployeeSelection'].employee.options[document.forms['EmployeeSelection'].employee.options.selectedIndex].value">
- <option value="-1">-- New employee --</option>
- <esql:connection>
- <esql:pool>personnel</esql:pool>
- <esql:execute-query>
- <esql:query>select id, department_id, name from employee order
by name</esql:query>
- <esql:results>
- <esql:row-results>
- <xsp:logic>
+ <select size="1" name="employee"
+ onChange="top.location.href=window.location.pathname + '?employee='
+
document.forms['EmployeeSelection'].employee.options[document.forms['EmployeeSelection'].employee.options.selectedIndex].value">
+ <option value="-1">-- New employee --</option>
+ <esql:connection>
+ <esql:pool>personnel</esql:pool>
+ <esql:execute-query>
+ <esql:query>select id, department_id, name from employee order
by name</esql:query>
+ <esql:results>
+ <esql:row-results>
+ <xsp:logic>
if (<esql:get-string column="id"/>.equals(empID)) {
depID = <esql:get-string column="department_id"/>;
- name = <esql:get-string column="name"/>;
- xspAttr.addAttribute("", "selected", "selected",
"CDATA", "");
+ name = <esql:get-string
column="name"/>;
+ xspAttr.addAttribute("",
"selected", "selected", "CDATA", "");
}
- </xsp:logic>
- <option>
- <xsp:attribute name="value"><esql:get-int
column="id"/></xsp:attribute>
- <esql:get-string column="name"/>
- </option>
- </esql:row-results>
- </esql:results>
- </esql:execute-query>
- </esql:connection>
- </select>
+ </xsp:logic>
+ <option>
+ <xsp:attribute name="value"><esql:get-int
column="id"/></xsp:attribute>
+ <esql:get-string column="name"/>
+ </option>
+ </esql:row-results>
+ </esql:results>
+ </esql:execute-query>
+ </esql:connection>
+ </select>
</form>
+
<form action="" method="POST" name="EmployeeEntry">
<script>document.forms["EmployeeEntry"].action =
window.location.pathname</script>
<input type="hidden" name="employee">
- <xsp:attribute name="value"><xsp:expr>((empID != null) ? empID :
"")</xsp:expr></xsp:attribute>
- </input>
+ <xsp:attribute name="value"><xsp:expr>((empID != null) ? empID :
"")</xsp:expr></xsp:attribute>
+ </input>
<para>Employee Name:
- <input name="name" type="text">
- <xsp:attribute name="value"><xsp:expr>((name != null) ? name :
"")</xsp:expr></xsp:attribute>
- </input>
- </para>
+ <input name="name" type="text">
+ <xsp:attribute name="value"><xsp:expr>((name != null) ? name :
"")</xsp:expr></xsp:attribute>
+ </input>
+ </para>
<para>Department:
<select name="department">
<option value="-1">-- Select department --</option>
@@ -84,11 +83,11 @@
<esql:query>select id, name from department order by
name</esql:query>
<esql:results>
<esql:row-results>
- <xsp:logic>
+ <xsp:logic>
if (<esql:get-string column="id"/>.equals(depID)) {
- xspAttr.addAttribute("", "selected", "selected",
"CDATA", "");
+ xspAttr.addAttribute("",
"selected", "selected", "CDATA", "");
}
- </xsp:logic>
+ </xsp:logic>
<option>
<xsp:attribute name="value"><esql:get-int
column="id"/></xsp:attribute>
<esql:get-string column="name"/>
Modified:
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/process-department.xsp
URL:
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/process-department.xsp?rev=167951&r1=167950&r2=167951&view=diff
==============================================================================
---
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/process-department.xsp
(original)
+++
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/process-department.xsp
Tue May 3 11:22:14 2005
@@ -15,17 +15,17 @@
limitations under the License.
-->
-<xsp:page
- language="java"
+<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:esql="http://apache.org/cocoon/SQL/v2"
- xmlns:xsp-request="http://apache.org/xsp/request/2.0"
->
+ xmlns:xsp-request="http://apache.org/xsp/request/2.0">
+
<xsp:logic>
String process = null;
String name = null;
int currId = -1;
</xsp:logic>
+
<page>
<xsp:logic>
process = <xsp-request:get-parameter name="process"/>;
@@ -33,10 +33,10 @@
</xsp:logic>
<resources>
- <resource type="file"
href="employee.xml?cocoon-view=pretty-content">Descriptor</resource>
- <resource type="file"
href="../transform/sql-page.xml.sql">Schema</resource>
- <resource type="doc"
href="userdocs/actions/database-actions.html">Actions</resource>
- <resource type="doc" href="userdocs/xsp/esql.html">ESQL</resource>
+ <resource type="file"
href="employee.xml?cocoon-view=pretty-content">Descriptor</resource>
+ <resource type="file" href="../schema.sql">Schema</resource>
+ <resource type="doc"
href="userdocs/actions/database-actions.html">Actions</resource>
+ <resource type="doc" href="userdocs/xsp/esql.html">ESQL</resource>
</resources>
<title><xsp:expr>process</xsp:expr> Department Processed</title>
@@ -45,13 +45,13 @@
<esql:pool>personnel</esql:pool>
<esql:execute-query>
<esql:query>
- select max(id) as maxid from department
- </esql:query>
+ select max(id) as maxid from department
+ </esql:query>
<esql:results>
- <esql:row-results>
- <xsp:logic>
+ <esql:row-results>
+ <xsp:logic>
currId = <esql:get-int column="maxid"/>;
- </xsp:logic>
+ </xsp:logic>
<esql:execute-query>
<esql:query>
insert into department (id, name) values (
@@ -60,7 +60,7 @@
)
</esql:query>
</esql:execute-query>
- </esql:row-results>
+ </esql:row-results>
</esql:results>
</esql:execute-query>
</esql:connection>
Modified:
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/process-employee.xsp
URL:
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/process-employee.xsp?rev=167951&r1=167950&r2=167951&view=diff
==============================================================================
---
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/process-employee.xsp
(original)
+++
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/process-employee.xsp
Tue May 3 11:22:14 2005
@@ -15,18 +15,18 @@
limitations under the License.
-->
-<xsp:page
- language="java"
+<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:esql="http://apache.org/cocoon/SQL/v2"
- xmlns:xsp-request="http://apache.org/xsp/request/2.0"
->
+ xmlns:xsp-request="http://apache.org/xsp/request/2.0">
+
<xsp:logic>
String process = null;
String name = null;
String departmentId = null;
int currId = -1;
</xsp:logic>
+
<page>
<xsp:logic>
process = <xsp-request:get-parameter name="process"/>;
@@ -35,34 +35,34 @@
</xsp:logic>
<resources>
- <resource type="file"
href="employee.xml?cocoon-view=pretty-content">Descriptor</resource>
- <resource type="file"
href="../transform/sql-page.xml.sql">Schema</resource>
- <resource type="doc"
href="userdocs/actions/database-actions.html">Actions</resource>
- <resource type="doc" href="userdocs/xsp/esql.html">ESQL</resource>
+ <resource type="file"
href="employee.xml?cocoon-view=pretty-content">Descriptor</resource>
+ <resource type="file" href="../schema.sql">Schema</resource>
+ <resource type="doc"
href="userdocs/actions/database-actions.html">Actions</resource>
+ <resource type="doc" href="userdocs/xsp/esql.html">ESQL</resource>
</resources>
<title><xsp:expr>process</xsp:expr> Employee Processed</title>
<content>
<esql:connection>
<esql:pool>personnel</esql:pool>
- <esql:autocommit>false</esql:autocommit>
+ <esql:autocommit>false</esql:autocommit>
<esql:execute-query>
<esql:query>select max(id) as maxid from employee</esql:query>
<esql:results>
- <esql:row-results>
- <xsp:logic>
+ <esql:row-results>
+ <xsp:logic>
currId = <esql:get-int column="maxid"/>;
- </xsp:logic>
+ </xsp:logic>
<esql:execute-query>
<esql:query>
insert into employee (id, name, department_id) values (
(<esql:parameter><xsp:expr>currId +
1</xsp:expr></esql:parameter>),
- <esql:parameter><xsp:expr>name</xsp:expr></esql:parameter>,
-
<esql:parameter><xsp:expr>departmentId</xsp:expr></esql:parameter>
+ <esql:parameter><xsp:expr>name</xsp:expr></esql:parameter>,
+
<esql:parameter><xsp:expr>departmentId</xsp:expr></esql:parameter>
)
</esql:query>
</esql:execute-query>
- </esql:row-results>
+ </esql:row-results>
</esql:results>
</esql:execute-query>
</esql:connection>
Modified:
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/sitemap.xmap
URL:
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/sitemap.xmap?rev=167951&r1=167950&r2=167951&view=diff
==============================================================================
---
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/sitemap.xmap
(original)
+++
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/org-db/sitemap.xmap
Tue May 3 11:22:14 2005
@@ -14,107 +14,103 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
+
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-<!-- ========================= Components ================================ -->
+ <!-- ========================= Components ================================
-->
- <map:components>
- <!-- original database actions -->
- <map:actions>
- <map:action logger="sitemap.action.add-employee" name="add-employee"
src="org.apache.cocoon.acting.DatabaseAddAction"/>
- <map:action logger="sitemap.action.del-employee" name="del-employee"
src="org.apache.cocoon.acting.DatabaseDeleteAction"/>
- <map:action logger="sitemap.action.upd-employee" name="upd-employee"
src="org.apache.cocoon.acting.DatabaseUpdateAction"/>
- </map:actions>
-
- </map:components>
-
-
-<!-- ========================== Action sets ================================
-->
-
-<!--
- Action sets group actions together. If some actions are often used
- together in pipeline fragments, it's easier to group them and refer
- to the group. For more info, please see the docs.
--->
-
- <map:action-sets>
- <map:action-set name="employee">
- <map:act action="Add" type="add-employee"/>
- <map:act action="Delete" type="del-employee"/>
- <map:act action="Update" type="upd-employee"/>
- </map:action-set>
- </map:action-sets>
-
-<!-- ============================ Views ====================================
-->
-
- <map:views>
- <map:view name="content" from-label="content">
- <map:serialize type="xml"/>
- </map:view>
-
- <map:view from-label="content" name="pretty-content">
- <map:transform src="context://stylesheets/system/xml2html.xslt"/>
- <map:serialize type="html"/>
- </map:view>
-
- <map:view name="links" from-position="last">
- <map:serialize type="links"/>
- </map:view>
-
- </map:views>
-
-<!-- =========================== Pipelines =================================
-->
-
- <map:pipelines>
-
- <map:pipeline>
-
- <map:match pattern="employee.xml">
- <map:generate src="{0}"/>
- <map:serialize type="xml"/>
- </map:match>
-
- <map:match pattern="employee">
- <map:act set="employee">
- <map:parameter name="descriptor" value="employee.xml"/>
- <!--
- Here an action is used. To be precise: all actions that were
- grouped together to a set named "employee". See user docs on
- actions for more on this.
-
- This fragment until the closing tag of map:act is only
- included if at least one action of this set completes
- successfully.
- -->
- <map:generate src="employee.xsp" type="serverpages"/>
- <map:transform
src="context://samples/stylesheets/dynamic-page2html.xsl">
- <map:parameter name="servletPath" value="{request:servletPath}"/>
- <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
- <map:parameter name="contextPath" value="{request:contextPath}"/>
- <map:parameter name="file" value=".xsp"/>
- </map:transform>
- <map:serialize/>
- </map:act>
- </map:match>
-
- <map:match pattern="*">
- <map:generate src="{1}.xsp" type="serverpages"/>
- <map:transform
src="context://samples/stylesheets/dynamic-page2html.xsl">
+ <map:components>
+ <map:actions>
+ <!--
+ - Original database actions
+ -->
+ <map:action logger="sitemap.action.add-employee" name="add-employee"
src="org.apache.cocoon.acting.DatabaseAddAction"/>
+ <map:action logger="sitemap.action.del-employee" name="del-employee"
src="org.apache.cocoon.acting.DatabaseDeleteAction"/>
+ <map:action logger="sitemap.action.upd-employee" name="upd-employee"
src="org.apache.cocoon.acting.DatabaseUpdateAction"/>
+ </map:actions>
+ </map:components>
+
+ <!-- ========================== Action sets ================================
-->
+
+ <!--
+ - Action sets group actions together. If some actions are often used
+ - together in pipeline fragments, it's easier to group them and refer
+ - to the group. For more info, please see the docs.
+ -->
+ <map:action-sets>
+ <map:action-set name="employee">
+ <map:act action="Add" type="add-employee"/>
+ <map:act action="Delete" type="del-employee"/>
+ <map:act action="Update" type="upd-employee"/>
+ </map:action-set>
+ </map:action-sets>
+
+ <!-- ============================ Views ====================================
-->
+
+ <map:views>
+ <map:view name="content" from-label="content">
+ <map:serialize type="xml"/>
+ </map:view>
+
+ <map:view from-label="content" name="pretty-content">
+ <map:transform src="context://stylesheets/system/xml2html.xslt"/>
+ <map:serialize type="html"/>
+ </map:view>
+
+ <map:view name="links" from-position="last">
+ <map:serialize type="links"/>
+ </map:view>
+ </map:views>
+
+ <!-- =========================== Pipelines =================================
-->
+
+ <map:pipelines>
+ <map:pipeline>
+
+ <map:match pattern="employee.xml">
+ <map:generate src="{0}"/>
+ <map:serialize type="xml"/>
+ </map:match>
+
+ <map:match pattern="employee">
+ <map:act set="employee">
+ <map:parameter name="descriptor" value="employee.xml"/>
+ <!--
+ - Here an action is used. To be precise: all actions that were
+ - grouped together to a set named "employee". See user docs on
+ - actions for more on this.
+ -
+ - This fragment until the closing tag of map:act is only
+ - included if at least one action of this set completes
+ - successfully.
+ -->
+ <map:generate src="employee.xsp" type="serverpages"/>
+ <map:transform
src="context://samples/stylesheets/dynamic-page2html.xsl">
+ <map:parameter name="servletPath" value="{request:servletPath}"/>
+ <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ <map:parameter name="file" value=".xsp"/>
+ </map:transform>
+ <map:serialize/>
+ </map:act>
+ </map:match>
+
+ <map:match pattern="*">
+ <map:generate src="{1}.xsp" type="serverpages"/>
+ <map:transform
src="context://samples/stylesheets/dynamic-page2html.xsl">
<map:parameter name="servletPath" value="{request:servletPath}"/>
<map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
<map:parameter name="contextPath" value="{request:contextPath}"/>
<map:parameter name="file" value=".xsp"/>
- </map:transform>
- <map:serialize/>
- </map:match>
-
- <map:match pattern="">
- <map:redirect-to uri="../"/>
- </map:match>
+ </map:transform>
+ <map:serialize/>
+ </map:match>
+
+ <map:match pattern="">
+ <map:redirect-to uri="../"/>
+ </map:match>
- </map:pipeline>
- </map:pipelines>
+ </map:pipeline>
+ </map:pipelines>
</map:sitemap>
-
-<!-- end of file -->
Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/sitemap.xmap
URL:
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/sitemap.xmap?rev=167951&r1=167950&r2=167951&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/sitemap.xmap
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/sitemap.xmap Tue
May 3 11:22:14 2005
@@ -19,63 +19,64 @@
<!-- ========================= Components ================================ -->
- <map:components>
- <map:readers default="resource">
- <map:reader name="databasereader" logger="sitemap.reader.databasereader"
- src="org.apache.cocoon.reading.DatabaseReader">
- <use-connection>personnel</use-connection>
- </map:reader>
- </map:readers>
- </map:components>
-
-<!-- =========================== Views =================================== -->
-
- <map:views>
- <map:view name="content" from-label="content">
- <map:serialize type="xml"/>
- </map:view>
-
- <map:view from-label="content" name="pretty-content">
- <map:transform src="context://stylesheets/system/xml2html.xslt"/>
- <map:serialize type="html"/>
- </map:view>
-
- <map:view name="links" from-position="last">
- <map:serialize type="links"/>
- </map:view>
-
- </map:views>
-
-<!-- =========================== Pipelines =================================
-->
-
- <map:pipelines>
-
- <map:pipeline>
-
- <map:match pattern="">
- <map:redirect-to uri="samples"/>
- </map:match>
-
- <map:match pattern="welcome">
- <map:redirect-to uri="samples"/>
- </map:match>
-
- <map:match pattern="samples">
- <map:generate src="samples.xml"/>
- <map:transform
src="context://samples/common/style/xsl/html/simple-samples2html.xsl">
- <map:parameter name="contextPath" value="{request:contextPath}"/>
- </map:transform>
- <map:serialize/>
- </map:match>
-
- <!-- samples automount -->
- <map:match pattern="*/**">
- <map:mount uri-prefix="{1}" src="{1}/" check-reload="yes"/>
- </map:match>
-
- </map:pipeline>
- </map:pipelines>
+ <map:components>
+ <map:readers default="resource">
+ <map:reader name="databasereader"
+ logger="sitemap.reader.databasereader"
+ src="org.apache.cocoon.reading.DatabaseReader">
+ <use-connection>personnel</use-connection>
+ </map:reader>
+ </map:readers>
+ </map:components>
+
+ <!-- =========================== Views ===================================
-->
+
+ <map:views>
+ <map:view name="content" from-label="content">
+ <map:serialize type="xml"/>
+ </map:view>
+
+ <map:view from-label="content" name="pretty-content">
+ <map:transform src="context://stylesheets/system/xml2html.xslt"/>
+ <map:serialize type="html"/>
+ </map:view>
+
+ <map:view name="links" from-position="last">
+ <map:serialize type="links"/>
+ </map:view>
+ </map:views>
+
+ <!-- =========================== Pipelines =================================
-->
+
+ <map:pipelines>
+ <map:pipeline>
+
+ <map:match pattern="">
+ <map:redirect-to uri="samples"/>
+ </map:match>
+
+ <map:match pattern="welcome">
+ <map:redirect-to uri="samples"/>
+ </map:match>
+
+ <map:match pattern="schema.sql">
+ <map:read src="context://WEB-INF/db/schema.sql"
mime-type="text/plain"/>
+ </map:match>
+
+ <map:match pattern="samples">
+ <map:generate src="samples.xml"/>
+ <map:transform
src="context://samples/common/style/xsl/html/simple-samples2html.xsl">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ <map:serialize/>
+ </map:match>
+
+ <!-- samples automount -->
+ <map:match pattern="*/**">
+ <map:mount uri-prefix="{1}" src="{1}/" check-reload="yes"/>
+ </map:match>
-</map:sitemap>
+ </map:pipeline>
+ </map:pipelines>
-<!-- end of file -->
+</map:sitemap>
Modified:
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/stylesheets/sql2html.xsl
URL:
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/stylesheets/sql2html.xsl?rev=167951&r1=167950&r2=167951&view=diff
==============================================================================
---
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/stylesheets/sql2html.xsl
(original)
+++
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/stylesheets/sql2html.xsl
Tue May 3 11:22:14 2005
@@ -15,43 +15,52 @@
limitations under the License.
-->
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:sql="http://apache.org/cocoon/SQL/2.0">
-
+<!--
+ - Transforms sql transformer output into html.
+ - @version $Id$
+ -->
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:sql="http://apache.org/cocoon/SQL/2.0">
<xsl:import href="../../../common/style/xsl/html/simple-page2html.xsl"/>
<xsl:template match="sql:rowset">
- <xsl:choose>
- <xsl:when test="ancestor::sql:rowset">
- <tr>
- <td>
- <table border="1">
- <xsl:apply-templates/>
- </table>
- </td>
- </tr>
- </xsl:when>
- <xsl:otherwise>
- <table border="1">
- <xsl:apply-templates/>
- </table>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="ancestor::sql:rowset">
+ <tr>
+ <td>
+ <table border="1">
+ <xsl:apply-templates/>
+ </table>
+ </td>
+ </tr>
+ </xsl:when>
+ <xsl:otherwise>
+ <table border="1">
+ <xsl:apply-templates/>
+ </table>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<xsl:template match="sql:row">
- <tr>
- <xsl:apply-templates/>
- </tr>
+ <tr>
+ <xsl:apply-templates/>
+ </tr>
</xsl:template>
<xsl:template match="sql:name">
- <td><xsl:value-of select="."/></td>
+ <td>
+ <xsl:value-of select="."/>
+ <br/>
+ <xsl:copy-of select="../sql:description/*"/>
+ </td>
</xsl:template>
+ <xsl:template match="sql:description"/>
+
<xsl:template match="sql:id">
- <!-- ignore -->
+ <!-- ignore -->
</xsl:template>
-
</xsl:stylesheet>
Modified:
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/transform/sitemap.xmap
URL:
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/transform/sitemap.xmap?rev=167951&r1=167950&r2=167951&view=diff
==============================================================================
---
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/transform/sitemap.xmap
(original)
+++
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/transform/sitemap.xmap
Tue May 3 11:22:14 2005
@@ -18,59 +18,51 @@
<!-- ============================ Views ====================================
-->
- <map:views>
- <map:view name="content" from-label="content">
- <map:serialize type="xml"/>
- </map:view>
-
- <map:view from-label="content" name="pretty-content">
- <map:transform src="context://stylesheets/system/xml2html.xslt"/>
- <map:serialize type="html"/>
- </map:view>
-
- <map:view name="links" from-position="last">
- <map:serialize type="links"/>
- </map:view>
-
- </map:views>
+ <map:views>
+ <map:view name="content" from-label="content">
+ <map:serialize type="xml"/>
+ </map:view>
+
+ <map:view from-label="content" name="pretty-content">
+ <map:transform src="context://stylesheets/system/xml2html.xslt"/>
+ <map:serialize type="html"/>
+ </map:view>
+
+ <map:view name="links" from-position="last">
+ <map:serialize type="links"/>
+ </map:view>
+ </map:views>
<!-- =========================== Pipelines =================================
-->
- <map:pipelines>
+ <map:pipelines>
- <map:pipeline>
- <map:match pattern="sql-page.xml.sql">
- <map:read src="sql-page.xml.sql" mime-type="text/plain"/>
- </map:match>
-
- <map:match pattern="*">
- <map:generate src="{1}.xml"/>
- <map:transform type="sql">
- <map:parameter name="use-connection" value="personnel"/>
- <!--
- Let's have a look at the user docs:
-
- "[...] The purpose of the SQLTransformer is to query a
- database and translate the result to XML. [...]"
- -->
- </map:transform>
- <map:transform src="../stylesheets/sql2html.xsl">
- <map:parameter name="servletPath" value="{request:servletPath}"/>
- <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
- <map:parameter name="contextPath" value="{request:contextPath}"/>
- <map:parameter name="file" value=".xml"/>
- </map:transform>
- <map:serialize/>
- </map:match>
-
- <map:match pattern="">
- <map:redirect-to uri="../"/>
- </map:match>
-
- </map:pipeline>
-
- </map:pipelines>
+ <map:pipeline>
+ <map:match pattern="*">
+ <map:generate src="{1}.xml"/>
+ <!--
+ - Let's have a look at the user docs:
+ -
+ - "[...] The purpose of the SQLTransformer is to query a
+ - database and translate the result to XML. [...]"
+ -->
+ <map:transform type="sql">
+ <map:parameter name="use-connection" value="personnel"/>
+ </map:transform>
+ <map:transform src="../stylesheets/sql2html.xsl">
+ <map:parameter name="servletPath" value="{request:servletPath}"/>
+ <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ <map:parameter name="file" value=".xml"/>
+ </map:transform>
+ <map:serialize/>
+ </map:match>
+
+ <map:match pattern="">
+ <map:redirect-to uri="../"/>
+ </map:match>
-</map:sitemap>
+ </map:pipeline>
+ </map:pipelines>
-<!-- end of file -->
+</map:sitemap>
Modified:
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/transform/sql-page.xml
URL:
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/transform/sql-page.xml?rev=167951&r1=167950&r2=167951&view=diff
==============================================================================
---
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/transform/sql-page.xml
(original)
+++
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/transform/sql-page.xml
Tue May 3 11:22:14 2005
@@ -15,27 +15,26 @@
limitations under the License.
-->
-<page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
+<page>
+ <title>Hello</title>
- <title>Hello</title>
- <resources>
- <resource type="file" href="sql-page.xml.sql">Schema</resource>
- <resource type="doc"
href="userdocs/transformers/sql-transformer.html">SQL Transformer</resource>
- </resources>
- <content>
- <para>This is my first Cocoon2 page filled with sql data!</para>
+ <resources>
+ <resource type="file" href="../schema.sql">Schema</resource>
+ <resource type="doc" href="userdocs/transformers/sql-transformer.html">SQL
Transformer</resource>
+ </resources>
- <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
- <query>
- select id,name from department
- </query>
- <execute-query>
- <query>
- select id,name from employee where department_id = <ancestor-value
sql:name="id" sql:level="1"/>
- </query>
- </execute-query>
- </execute-query>
+ <content>
+ <para>This is my first Cocoon2 page filled with SQL data!</para>
- </content>
+ <sql:execute-query xmlns:sql="http://apache.org/cocoon/SQL/2.0">
+ <sql:query>
+ select id, name, description from department
+ </sql:query>
+ <sql:execute-query>
+ <sql:query>
+ select id, name from employee where department_id =
<sql:ancestor-value sql:name="id" sql:level="1"/>
+ </sql:query>
+ </sql:execute-query>
+ </sql:execute-query>
+ </content>
</page>
-
Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/xsp/esql.xsp
URL:
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/xsp/esql.xsp?rev=167951&r1=167950&r2=167951&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/xsp/esql.xsp
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/databases/samples/xsp/esql.xsp Tue
May 3 11:22:14 2005
@@ -15,151 +15,136 @@
limitations under the License.
-->
-<!-- CVS: $Id: esql.xsp,v 1.5 2004/04/05 12:25:35 antonio Exp $ -->
+<!-- CVS: $Id$ -->
<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:esql="http://apache.org/cocoon/SQL/v2">
<page>
- <title>A Database Driven XSP Page</title>
+ <title>A Database Driven XSP Page</title>
<resources>
- <resource type="file"
href="../transform/sql-page.xml.sql">Schema</resource>
- <resource type="doc" href="userdocs/xsp/esql">ESQL</resource>
+ <resource type="file" href="../schema.sql">Schema</resource>
+ <resource type="doc" href="userdocs/xsp/esql">ESQL</resource>
</resources>
- <content>
-
- <esql:connection>
- <esql:pool>personnel</esql:pool>
-
-
- <para>
- Below you see all guys from the departments
- </para>
-
- <esql:execute-query>
- <esql:query>select * from employee</esql:query>
- <esql:results>
- <esql:row-results>
- <para><esql:get-string column="name"/></para>
- <!-- uncomment if you want columns to become tags -->
- <!-- <esql:get-columns/> -->
- </esql:row-results>
- </esql:results>
- </esql:execute-query>
-
- <hr/>
-
- <para>
- Below you see just some of the guys
- </para>
-
- <esql:execute-query>
- <esql:query>select * from employee</esql:query>
- <esql:use-limit-clause>jdbc</esql:use-limit-clause>
- <esql:skip-rows>1</esql:skip-rows>
- <esql:max-rows>2</esql:max-rows>
- <esql:results>
- <esql:row-results>
- <para><esql:get-string column="name"/></para>
- </esql:row-results>
- <esql:previous-results>
- We skipped some.
- </esql:previous-results>
- <esql:more-results>
- There are some more.
- </esql:more-results>
- <para>
- There is a total of <esql:row-count/> employees.
- </para>
- </esql:results>
- </esql:execute-query>
-
- <hr/>
-
- <para>
- Below departments and employees are printed.
- Without the grouping feature, the result would look like this:
- </para>
-
- <esql:execute-query>
- <esql:query>
- SELECT department.name, employee.id, employee.name as empName FROM
department, employee
- WHERE department.id = employee.department_id ORDER BY
department.name
- </esql:query>
- <esql:results>
- <esql:row-results>
- <Department>
- <xsp:attribute name='name'><esql:get-string
column='name'/></xsp:attribute>
- <h2><esql:get-string column='name'/></h2>
- <para><employee><esql:get-string
column='empName'/></employee></para>
- </Department>
- </esql:row-results>
- </esql:results>
- </esql:execute-query>
-
- <hr/>
-
- <para>
- This uses the grouping feature in esql.
- </para>
-
- <esql:execute-query>
- <esql:query>
- SELECT department.name, employee.id, employee.name as empName FROM
department, employee
- WHERE department.id = employee.department_id ORDER BY
department.name
- </esql:query>
- <esql:results>
- <esql:row-results>
- <esql:group group-on='name'><!-- grouping -->
- <Department>
- <xsp:attribute name='name'><esql:get-string
column='name'/></xsp:attribute>
- <h2><esql:get-string column='name'/></h2>
- <esql:member><!-- grouping -->
- <para><employee><esql:get-string
column='empName'/></employee></para>
- </esql:member><!--grouping -->
- </Department>
- </esql:group><!-- grouping -->
- </esql:row-results>
- </esql:results>
- </esql:execute-query>
-
- <hr/>
-
- <para>
- This uses nested queries.
- </para>
-
- <esql:execute-query>
- <esql:query>
- SELECT name, id FROM department ORDER BY name
- </esql:query>
- <esql:results>
- <esql:row-results>
- <Department>
- <xsp:attribute name='name'><esql:get-string
column='name'/></xsp:attribute>
- <h2><esql:get-string column='name'/></h2>
-
- <esql:execute-query>
- <esql:query>
- select name from employee
- where department_id = <esql:parameter
type="int"><esql:get-int column="id" ancestor="1"/></esql:parameter>
- </esql:query>
- <esql:results>
- <esql:row-results>
- <para><employee><esql:get-string
column='name'/></employee></para>
- </esql:row-results>
- </esql:results>
- </esql:execute-query>
-
- </Department>
- </esql:row-results>
- </esql:results>
- </esql:execute-query>
+ <content>
+ <esql:connection>
+ <esql:pool>personnel</esql:pool>
+
+ <h3>Below you see all of the guys</h3>
+ <ul>
+ <esql:execute-query>
+ <esql:query>select * from employee</esql:query>
+ <esql:results>
+ <esql:row-results>
+ <li><esql:get-string column="name"/></li>
+ <!-- uncomment if you want columns to become tags -->
+ <!-- <esql:get-columns/> -->
+ </esql:row-results>
+ </esql:results>
+ </esql:execute-query>
+ </ul>
+
+ <h3>Below you see just some of the guys</h3>
+ <esql:execute-query>
+ <esql:query>select * from employee</esql:query>
+ <esql:use-limit-clause>jdbc</esql:use-limit-clause>
+ <esql:skip-rows>1</esql:skip-rows>
+ <esql:max-rows>2</esql:max-rows>
+ <esql:results>
+ <ul>
+ <esql:row-results>
+ <li><esql:get-string column="name"/></li>
+ </esql:row-results>
+ <esql:previous-results>
+ <li>We skipped some.</li>
+ </esql:previous-results>
+ <esql:more-results>
+ <li>There are some more.</li>
+ </esql:more-results>
+ </ul>
+ <para>
+ There is a total of <esql:row-count/> employees.
+ </para>
+ </esql:results>
+ </esql:execute-query>
+
+ <h3>
+ Below departments and employees are printed.
+ Without the grouping feature, the result would look like this:
+ </h3>
+
+ <esql:execute-query>
+ <esql:query>
+ SELECT department.name, employee.id, employee.name as empName FROM
department, employee
+ WHERE department.id = employee.department_id ORDER BY
department.name
+ </esql:query>
+ <esql:results>
+ <esql:row-results>
+ <Department>
+ <xsp:attribute name='name'><esql:get-string
column='name'/></xsp:attribute>
+ <h4><esql:get-string column='name'/></h4>
+ <para><employee><esql:get-string
column='empName'/></employee></para>
+ </Department>
+ </esql:row-results>
+ </esql:results>
+ </esql:execute-query>
+
+ <h3>
+ This uses the grouping feature in esql.
+ </h3>
+
+ <esql:execute-query>
+ <esql:query>
+ SELECT department.name, employee.id, employee.name as empName FROM
department, employee
+ WHERE department.id = employee.department_id ORDER BY
department.name
+ </esql:query>
+ <esql:results>
+ <esql:row-results>
+ <esql:group group-on='name'><!-- grouping -->
+ <Department>
+ <xsp:attribute name='name'><esql:get-string
column='name'/></xsp:attribute>
+ <h4><esql:get-string column='name'/></h4>
+ <esql:member><!-- grouping -->
+ <para><employee><esql:get-string
column='empName'/></employee></para>
+ </esql:member><!--grouping -->
+ </Department>
+ </esql:group><!-- grouping -->
+ </esql:row-results>
+ </esql:results>
+ </esql:execute-query>
+
+ <h3>This uses nested queries.</h3>
+ <esql:execute-query>
+ <esql:query>
+ SELECT name, id FROM department ORDER BY name
+ </esql:query>
+ <esql:results>
+ <esql:row-results>
+ <Department>
+ <xsp:attribute name='name'><esql:get-string
column='name'/></xsp:attribute>
+ <h4><esql:get-string column='name'/></h4>
+
+ <esql:execute-query>
+ <esql:query>
+ select name from employee
+ where department_id = <esql:parameter
type="int"><esql:get-int column="id" ancestor="1"/></esql:parameter>
+ </esql:query>
+ <esql:results>
+ <esql:row-results>
+ <para><employee><esql:get-string
column='name'/></employee></para>
+ </esql:row-results>
+ </esql:results>
+ </esql:execute-query>
+
+ </Department>
+ </esql:row-results>
+ </esql:results>
+ </esql:execute-query>
</esql:connection>
- </content>
+ </content>
</page>
</xsp:page>
Copied: cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/build.xml (from r165647,
cocoon/branches/BRANCH_2_1_X/src/blocks/databases/build.xml)
URL:
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/build.xml?p2=cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/build.xml&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/databases/build.xml&r1=165647&r2=167951&rev=167951&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/databases/build.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/build.xml Tue May 3
11:22:14 2005
@@ -14,12 +14,13 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<project default="main" >
- <target name="main">
+<project default="main" >
+ <target name="main">
<mkdir dir="${build.webapp.webinf}/db"/>
<copy file="${block.dir}/conf/cocoondb.script"
tofile="${build.webapp.webinf}/db/cocoondb.script"/>
<copy file="${block.dir}/conf/cocoondb.properties"
tofile="${build.webapp.webinf}/db/cocoondb.properties"/>
- </target>
-
-</project>
\ No newline at end of file
+ <copy file="${block.dir}/conf/schema.sql"
tofile="${build.webapp.webinf}/db/schema.sql"/>
+ </target>
+</project>
+
Copied: cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/conf/cocoondb.script
(from r165647,
cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/samples/WEB-INF/db/cocoondb.script)
URL:
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/conf/cocoondb.script?p2=cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/conf/cocoondb.script&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/samples/WEB-INF/db/cocoondb.script&r1=165647&r2=167951&rev=167951&view=diff
==============================================================================
---
cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/samples/WEB-INF/db/cocoondb.script
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/conf/cocoondb.script Tue May
3 11:22:14 2005
@@ -12,32 +12,35 @@
-- See the License for the specific language governing permissions and
-- limitations under the License.
-CREATE TABLE DEPARTMENT(ID INTEGER NOT NULL,NAME VARCHAR NOT NULL,CONSTRAINT
SYS_CT_1 UNIQUE(ID))
-CREATE TABLE EMPLOYEE(ID INTEGER NOT NULL,DEPARTMENT_ID INTEGER NOT NULL,NAME
VARCHAR NOT NULL,CONSTRAINT SYS_CT_3 UNIQUE(ID))
-CREATE TABLE USER(UID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0)
NOT NULL PRIMARY KEY,NAME VARCHAR,FIRSTNAME VARCHAR,UNAME VARCHAR,CONSTRAINT
SYS_CT_5 UNIQUE(UNAME))
-CREATE TABLE GROUPS(GID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0)
NOT NULL PRIMARY KEY,GNAME VARCHAR,CONSTRAINT SYS_CT_7 UNIQUE(GNAME))
-CREATE TABLE USER_GROUPS(UID INTEGER,GID INTEGER,CONSTRAINT SYS_CT_9
UNIQUE(UID,GID),CONSTRAINT SYS_FK_10 FOREIGN KEY(UID) REFERENCES
USER(UID),CONSTRAINT SYS_FK_11 FOREIGN KEY(GID) REFERENCES GROUPS(GID))
+CREATE TABLE DEPARTMENT(ID INTEGER NOT NULL,NAME VARCHAR NOT NULL,DESCRIPTION
VARCHAR NULL,UNIQUE(ID))
+CREATE TABLE EMPLOYEE(ID INTEGER NOT NULL,DEPARTMENT_ID INTEGER NOT NULL,NAME
VARCHAR NOT NULL,DESCRIPTION VARCHAR NULL,UNIQUE(ID))
+CREATE TABLE USER(UID INTEGER IDENTITY PRIMARY KEY,NAME VARCHAR,FIRSTNAME
VARCHAR,UNAME VARCHAR,UNIQUE(UNAME))
+CREATE TABLE GROUPS(GID INTEGER IDENTITY PRIMARY KEY,GNAME
VARCHAR,UNIQUE(GNAME))
+CREATE TABLE USER_GROUPS(UID INTEGER,GID INTEGER,UNIQUE(UID,GID),FOREIGN
KEY(UID)REFERENCES USER(UID),FOREIGN KEY(GID)REFERENCES GROUPS(GID))
CREATE TABLE STATE_TAX(CATEGORY VARCHAR NOT NULL,GROSSTAX_COLLECTED DOUBLE NOT
NULL,NETTAX_COLLECTED DOUBLE NOT NULL,YEAR INTEGER NOT NULL)
-CREATE TABLE MEDIA(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0)
NOT NULL PRIMARY KEY,IMAGE BINARY,MIMETYPE VARCHAR)
+CREATE TABLE MEDIA(ID INTEGER IDENTITY PRIMARY KEY,IMAGE BINARY,MIMETYPE
VARCHAR)
CREATE TABLE SOURCEPROPS(SOURCE VARCHAR NOT NULL,NAMESPACE VARCHAR NOT
NULL,NAME VARCHAR NOT NULL,VALUE VARCHAR NOT NULL,CONSTRAINT SYS_CT_11
UNIQUE(SOURCE,NAMESPACE,NAME))
+CREATE TABLE OJB_HL_SEQ(TABLENAME VARCHAR(175) NOT NULL,FIELDNAME VARCHAR(70)
NOT NULL,MAX_KEY BIGINT,GRAB_SIZE INTEGER,VERSION INTEGER,CONSTRAINT
SYS_PK_OJB_HL_SEQ PRIMARY KEY(TABLENAME,FIELDNAME))
+CREATE TABLE QUERY(ID BIGINT IDENTITY PRIMARY KEY,USER_ID VARCHAR NOT
NULL,Q_DATE TIMESTAMP,Q_BOOL VARCHAR,Q_NAME VARCHAR,Q_TYPE VARCHAR,Q_SIZE
BIGINT,UNIQUE(ID))
+CREATE TABLE CRITERION(ID BIGINT IDENTITY PRIMARY KEY,Q_ID BIGINT,C_FIELD
VARCHAR,C_MATCH VARCHAR,C_TERM VARCHAR,CONSTRAINT SYS_FK_20 FOREIGN KEY(Q_ID)
REFERENCES QUERY(ID),UNIQUE(ID))
CREATE USER SA PASSWORD "" ADMIN
SET WRITE_DELAY 60
-INSERT INTO DEPARTMENT VALUES(1,'Development')
-INSERT INTO DEPARTMENT VALUES(2,'Management')
-INSERT INTO DEPARTMENT VALUES(3,'Testers')
-INSERT INTO EMPLOYEE VALUES(1,1,'Donald Ball')
-INSERT INTO EMPLOYEE VALUES(2,1,'Sylvain Wallez')
-INSERT INTO EMPLOYEE VALUES(3,1,'Carsten Ziegeler')
-INSERT INTO EMPLOYEE VALUES(4,1,'Torsten Curdt')
-INSERT INTO EMPLOYEE VALUES(5,1,'Marcus Crafter')
-INSERT INTO EMPLOYEE VALUES(6,1,'Ovidiu Predescu')
-INSERT INTO EMPLOYEE VALUES(7,1,'Christian Haul')
-INSERT INTO EMPLOYEE VALUES(8,2,'Stefano Mazzocchi')
-INSERT INTO EMPLOYEE VALUES(9,3,'Pierpaolo Fumagalli')
-INSERT INTO EMPLOYEE VALUES(10,3,'Davanum Srinivas')
-INSERT INTO EMPLOYEE VALUES(11,3,'Carlos ChÃÂvez')
-INSERT INTO EMPLOYEE VALUES(12,3,'Antonio Gallardo')
-INSERT INTO EMPLOYEE VALUES(13,1,'Jeremy Quinn')
+INSERT INTO DEPARTMENT VALUES(1,'Development','<span>Department producing
software packages, <i>on time</i>, and <i>bug free</i>.</span>')
+INSERT INTO DEPARTMENT VALUES(2,'Management','<span>Department spending all
the budget on <i>meetings</i> and <i>donuts</i>.</span>')
+INSERT INTO DEPARTMENT VALUES(3,'Testers','<span>Department capable of finding
issues in <i>bug free</i> software packages.</span>')
+INSERT INTO EMPLOYEE VALUES(1,1,'Donald Ball','')
+INSERT INTO EMPLOYEE VALUES(2,1,'Sylvain Wallez','')
+INSERT INTO EMPLOYEE VALUES(3,1,'Carsten Ziegeler','')
+INSERT INTO EMPLOYEE VALUES(4,1,'Torsten Curdt','')
+INSERT INTO EMPLOYEE VALUES(5,1,'Marcus Crafter','')
+INSERT INTO EMPLOYEE VALUES(6,1,'Ovidiu Predescu','')
+INSERT INTO EMPLOYEE VALUES(7,1,'Christian Haul','')
+INSERT INTO EMPLOYEE VALUES(8,2,'Stefano Mazzocchi','')
+INSERT INTO EMPLOYEE VALUES(9,3,'Pierpaolo Fumagalli','')
+INSERT INTO EMPLOYEE VALUES(10,3,'Davanum Srinivas','')
+INSERT INTO EMPLOYEE VALUES(11,3,'Carlos ChÃÂvez','')
+INSERT INTO EMPLOYEE VALUES(12,3,'Antonio Gallardo','')
+INSERT INTO EMPLOYEE VALUES(13,1,'Jeremy Quinn','')
INSERT INTO STATE_TAX VALUES('State Sales And
Use',6.263250997E9,6.213961851E9,2000)
INSERT INTO STATE_TAX VALUES('Local Sales And
Use',1.321129345E9,1.321129345E9,2000)
INSERT INTO STATE_TAX VALUES('Resort Area Excise',718624.0E0,718624.0E0,2000)
@@ -72,3 +75,5 @@
INSERT INTO STATE_TAX VALUES('Horse Racing',1.7921198E7,1.7321198E7,2001)
INSERT INTO STATE_TAX VALUES('Severance',7981539.0E0,7967438.0E0,2001)
INSERT INTO STATE_TAX VALUES('School District
Income',1.61257059E8,1.53238001E8,2001)
+INSERT INTO QUERY VALUES(1,'anon','1970-01-01
01:00:00.0',NULL,'test','simple',20)
+INSERT INTO CRITERION VALUES(1,1,'any','any','cocoon')
Copied: cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/conf/schema.sql (from
r165647,
cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/samples/WEB-INF/db/tutorial.sql)
URL:
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/conf/schema.sql?p2=cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/conf/schema.sql&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/samples/WEB-INF/db/tutorial.sql&r1=165647&r2=167951&rev=167951&view=diff
==============================================================================
---
cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/samples/WEB-INF/db/tutorial.sql
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/hsqldb/conf/schema.sql Tue May 3
11:22:14 2005
@@ -1,6 +1,4 @@
-#
-
-# Copyright 1999-2004 The Apache Software Foundation
+# Copyright 1999-2005 The Apache Software Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -14,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# Tutorial DB
+#
+# Samples Database Schema
#
#
@@ -23,16 +22,16 @@
CREATE TABLE department (
id number(12) DEFAULT '0' NOT NULL,
name varchar(64) DEFAULT '' NOT NULL,
+ description varchar(255) DEFAULT '' NULL,
PRIMARY KEY (id)
);
#
# Data for table 'department'
#
-
-INSERT INTO department VALUES (1,'Development');
-INSERT INTO department VALUES (2,'Management');
-INSERT INTO department VALUES (3,'Testers');
+INSERT INTO department VALUES (1, 'Development', '<span>Department producing
software packages, <i>on time</i>, and <i>bug free</i>.</span>');
+INSERT INTO department VALUES (2, 'Management', '<span>Department spending all
the budget on <i>meetings</i> and <i>donuts</i>.</span>');
+INSERT INTO department VALUES (3, 'Testers', '<span>Department capable of
finding issues in <i>bug free</i> software packages.</span>');
#
# Table structure for table 'employee'
@@ -41,6 +40,7 @@
id number(12) DEFAULT '0' NOT NULL,
department_id number(12) DEFAULT '0' NOT NULL,
name varchar(64) DEFAULT '' NOT NULL,
+ description varchar(255) DEFAULT '' NULL,
PRIMARY KEY (id)
);
@@ -56,16 +56,15 @@
#
# Data for table 'employee'
#
-
-INSERT INTO EMPLOYEE VALUES(1,1,'Donald Ball')
-INSERT INTO EMPLOYEE VALUES(2,1,'Sylvain Wallez ')
-INSERT INTO EMPLOYEE VALUES(3,1,'Carsten Ziegeler ')
-INSERT INTO EMPLOYEE VALUES(4,1,'Torsten Curdt')
-INSERT INTO EMPLOYEE VALUES(5,1,'Marcus Crafter')
-INSERT INTO EMPLOYEE VALUES(6,1,'Ovidiu Predescu')
-INSERT INTO EMPLOYEE VALUES(7,1,'Christian Haul')
-INSERT INTO EMPLOYEE VALUES(8,2,'Stefano Mazzocchi')
-INSERT INTO EMPLOYEE VALUES(9,3,'Pierpaolo Fumagalli')
-INSERT INTO EMPLOYEE VALUES(10,3,'Davanum Srinivas')
-INSERT INTO EMPLOYEE VALUES(11,3, 'Carlos ChÃÂvez')
-INSERT INTO EMPLOYEE VALUES(12,3, 'Antonio Gallardo')
+INSERT INTO EMPLOYEE VALUES(1, 1, 'Donald Ball')
+INSERT INTO EMPLOYEE VALUES(2, 1, 'Sylvain Wallez ')
+INSERT INTO EMPLOYEE VALUES(3, 1, 'Carsten Ziegeler ')
+INSERT INTO EMPLOYEE VALUES(4, 1, 'Torsten Curdt')
+INSERT INTO EMPLOYEE VALUES(5, 1, 'Marcus Crafter')
+INSERT INTO EMPLOYEE VALUES(6, 1, 'Ovidiu Predescu')
+INSERT INTO EMPLOYEE VALUES(7, 1, 'Christian Haul')
+INSERT INTO EMPLOYEE VALUES(8, 2, 'Stefano Mazzocchi')
+INSERT INTO EMPLOYEE VALUES(9, 3, 'Pierpaolo Fumagalli')
+INSERT INTO EMPLOYEE VALUES(10, 3, 'Davanum Srinivas')
+INSERT INTO EMPLOYEE VALUES(11, 3, 'Carlos ChÃÂvez')
+INSERT INTO EMPLOYEE VALUES(12, 3, 'Antonio Gallardo')