haul 2003/01/17 03:29:23
Modified: . build.xml changes.xml
src/webapp/samples samples.xml sitemap.xmap
src/webapp/samples/docs/samples sample-apps.xml
sample-dynamic.xml sample-xsp.xml
src/webapp/samples/common/style/xsl/html
simple-samples2html.xsl
src/webapp/samples/chaperon sitemap.xmap
Log:
Move database samples to block
Modify build system to merge *.xsample files to block-samples.xml
Move authentication-fw samples to block-samples.xml
Move portal-fw samples to block-samples.xml
Fix simple-samples2html.xsl
- only one group works
- include groups and notes in balancing
- make gif rooted path
Revision Changes Path
1.308 +11 -6 xml-cocoon2/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/build.xml,v
retrieving revision 1.307
retrieving revision 1.308
diff -u -r1.307 -r1.308
--- build.xml 14 Jan 2003 09:26:56 -0000 1.307
+++ build.xml 17 Jan 2003 11:29:22 -0000 1.308
@@ -1449,10 +1449,15 @@
extension="xconf"
configuration="${build.war}/WEB-INF/cocoon.xconf"/>
+ <xconf-tool directory="${build.blocks.root}"
+ extension="xsamples"
+ configuration="${build.war}/samples/block-samples.xml"/>
+
<!-- Invoke the XConfTool to add optional entries for demos -->
<xconf-tool directory="${build.war}"
extension="xpipe"
configuration="${build.war}/sitemap.xmap"/>
+
</target>
<!-- =================================================================== -->
@@ -1844,7 +1849,7 @@
<target name="javadocs" depends="prepare-src-main, javadocs_check, javadocs_done"
unless="javadocs.notrequired"
description="Builds the API documentation (javadocs)">
-
+
<!-- unfortunately we have to make a distinction between jdk 1.4 and before,
because jdk 1.4 cannot cope very well with package names containing 'java'
like in o.a.c.components.language.programming.java. -->
@@ -1858,8 +1863,8 @@
destdir="${build.javadocs}"
author="true"
version="true"
- use="false"
- noindex="true"
+ use="true"
+ noindex="false"
windowtitle="${Name} API (${version}, ${TODAY})"
doctitle="${Name}"
bottom="Copyright © ${year} Apache Software Foundation. All
Rights Reserved."
@@ -1868,7 +1873,7 @@
<fileset dir="${build.dir}">
<include name="src/**/*.java"/>
<include name="blocks/**/*.java"/>
- <include name="deprecated/**/*.java"/>
+ <include name="deprecated/**/*.java"/>
</fileset>
<fileset dir="${blocks.dir}">
<include name="**/mocks/**/*.java"/>
@@ -1882,8 +1887,8 @@
destdir="${build.javadocs}"
author="true"
version="true"
- use="false"
- noindex="true"
+ use="true"
+ noindex="false"
windowtitle="${Name} API (${version}, ${TODAY})"
doctitle="${Name}"
bottom="Copyright © ${year} Apache Software Foundation. All
Rights Reserved."
1.339 +8 -5 xml-cocoon2/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/changes.xml,v
retrieving revision 1.338
retrieving revision 1.339
diff -u -r1.338 -r1.339
--- changes.xml 14 Jan 2003 17:22:29 -0000 1.338
+++ changes.xml 17 Jan 2003 11:29:22 -0000 1.339
@@ -40,11 +40,14 @@
</devs>
<release version="@version@" date="@date@">
- <action dev="NKB" type="fix" fixes-bug="13247"
- due-to="[EMAIL PROTECTED]"
due-to-email="[EMAIL PROTECTED]">
- Fix PNG output of SVGSerializer because The PNGTranscoder of Batik
- closes the stream.
+ <action dev="CH" type="add" fixes-bug="9075"
+ due-to="Michael Gerzabek"
due-to-email="[EMAIL PROTECTED]">
+ SAP R/3 connectivity components added.
</action>
+ <action dev="CH" type="update">
+ Moved block samples to own category, modified build system to merge
+ .xsample files to block-samples.xml.
+ </action>
<action dev="CZ" type="update">
Renaming components section for pipeline implementations to "pipes" and "pipe".
</action>
1.36 +8 -7 xml-cocoon2/src/webapp/samples/samples.xml
Index: samples.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/samples.xml,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- samples.xml 16 Jan 2003 13:02:08 -0000 1.35
+++ samples.xml 17 Jan 2003 11:29:22 -0000 1.36
@@ -56,12 +56,6 @@
</sample>
</group>
<group name="Web Applications">
- <sample name="Authentication Framework" href="authentication-fw/login">
- This is a demo of the authentication framework integrated into Cocoon.
- </sample>
- <sample name="Portal Framework" href="portal-fw/sunspotdemoportal">
- This is a demo of the portal framework integrated into Cocoon.
- </sample>
<sample name="Web Applications" href="sample-apps">
Samples showing how to perform form processing, state management,
and simple web-application with login and protected resources.
@@ -196,6 +190,13 @@
<sample name="Try Scratchpad" href="scratchpad">
Here is a peek of what the next release of Cocoon will bring.
To test these samples, you must have built Cocoon with "build (sh|bat)
installscratchpadwar".
+ </sample>
+ </group>
+ <group name="Block samples">
+ <sample name="Blocks with samples" href="blocks">
+ Functionality outside the core has been moved to units called "blocks". This
+ will lead to a more modular Cocoon. Some samples depend on additional
+ components that need to be installed and configured correctly.
</sample>
</group>
</samples>
1.25 +12 -47 xml-cocoon2/src/webapp/samples/sitemap.xmap
Index: sitemap.xmap
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/sitemap.xmap,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- sitemap.xmap 31 Oct 2002 03:21:13 -0000 1.24
+++ sitemap.xmap 17 Jan 2003 11:29:22 -0000 1.25
@@ -71,11 +71,12 @@
during pipeline setup.
-->
<map:actions>
+<!-- example, see databases block samples for more -->
+<!--
<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>
@@ -174,13 +175,15 @@
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>
+<!-- example, see databases block samples for more -->
+<!--
<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>
<!-- =========================== Pipelines ================================= -->
@@ -659,50 +662,6 @@
<map:serialize/>
</map:match>
- <map:match pattern="sql/*">
- <map:generate src="docs/samples/sql/{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/simple-sql2html.xsl"/>
- <map:serialize/>
- </map:match>
-
- <!-- ========================== Forms ================================= -->
- <map:match pattern="forms/employee">
- <map:act set="employee">
- <map:parameter name="descriptor" value="docs/samples/forms/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="docs/samples/forms/employee.xsp" type="serverpages"/>
- <map:transform src="stylesheets/dynamic-page2html.xsl">
- <map:parameter name="view-source"
value="docs/samples/forms/employee.xsp"/>
- </map:transform>
- <map:serialize/>
- </map:act>
- </map:match>
-
- <map:match pattern="forms/*">
- <map:generate src="docs/samples/forms/{1}.xsp" type="serverpages"/>
- <map:transform src="stylesheets/dynamic-page2html.xsl">
- <map:parameter name="view-source" value="docs/samples/forms/{1}.xsp"/>
- </map:transform>
- <map:serialize/>
- </map:match>
-
<!-- ======================= FormValidation ============================= -->
<map:match pattern="formvalidation/test">
@@ -932,6 +891,12 @@
<map:match pattern="scratchpad">
<map:generate src="scratchpad-samples.xml"/>
+ <map:transform type="xalan"
src="common/style/xsl/html/simple-samples2html.xsl"/>
+ <map:serialize/>
+ </map:match>
+
+ <map:match pattern="blocks">
+ <map:generate src="block-samples.xml"/>
<map:transform type="xalan"
src="common/style/xsl/html/simple-samples2html.xsl"/>
<map:serialize/>
</map:match>
1.3 +1 -19 xml-cocoon2/src/webapp/samples/docs/samples/sample-apps.xml
Index: sample-apps.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/docs/samples/sample-apps.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sample-apps.xml 9 Aug 2002 08:36:44 -0000 1.2
+++ sample-apps.xml 17 Jan 2003 11:29:22 -0000 1.3
@@ -16,10 +16,6 @@
form-validator, session-validator and session-invalidator
actions.
</sample>
- <sample name="Modular Database Actions" href="mod-db/user-list">
- An example web-application built around database actions from the
- modular package that supports auto increments and more.
- </sample>
</group>
<group name="Stateful Applications">
@@ -47,20 +43,6 @@
automated binding to
<xlink:a href="http://java.sun.com/products/javabeans/">JavaBeans</xlink:a>
and
<xlink:a href="http://www.w3.org/DOM/">DOM</xlink:a> instances.
- </sample> <sample name="Manage Employees" href="forms/employee"
xlink:role="dynamic">
- Adds, updates and deletes Employees to the employees table. You should make
sure
- that you have a database and table according to the
docs/samples/sql/sql-page.xml.sql
- definitions. Don't forget to change the driver information...
- </sample>
- <sample name="Insert Department" href="forms/add-department"
xlink:role="dynamic">
- Adds new Departments to the department table. You should make sure
- that you have a database and table according to the
docs/samples/sql/sql-page.xml.sql
- definitions. Don't forget to change the driver information...
- </sample>
- <sample name="Insert Employees" href="forms/add-employee" xlink:role="dynamic">
- Adds new Employees to the employees table. You should make sure
- that you have a database and table according to the
docs/samples/sql/sql-page.xml.sql
- definitions. Don't forget to change the driver information...
</sample>
<sample name="Form Validation" href="formvalidation/test" xlink:role="dynamic">
This example demonstrates the use of an action to validate user
1.2 +1 -12 xml-cocoon2/src/webapp/samples/docs/samples/sample-dynamic.xml
Index: sample-dynamic.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/docs/samples/sample-dynamic.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sample-dynamic.xml 2 Jul 2002 13:06:36 -0000 1.1
+++ sample-dynamic.xml 17 Jan 2003 11:29:22 -0000 1.2
@@ -69,17 +69,6 @@
</sample>
</group>
- <group name="Database Access">
- <sample name="Simple SQL" href="sql/sql-page" xlink:role="dynamic">
- Simple SQL example. You should make sure that you have a database and
- table according to the conf/sitemap.xmap and the
- docs/samples/sql/sql-page.xml.sql definitions.
- </sample>
- <sample name="ESQL" href="xsp/esql" xlink:role="dynamic">
- Simple example of the ESQL logicsheet.
- </sample>
- </group>
-
<group name="Aggregation Sample">
<sample name="Slashdot" href="news/slashdot.xml">
Live XML Feed from Slashdot.
1.2 +1 -4 xml-cocoon2/src/webapp/samples/docs/samples/sample-xsp.xml
Index: sample-xsp.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/docs/samples/sample-xsp.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sample-xsp.xml 2 Jul 2002 13:06:36 -0000 1.1
+++ sample-xsp.xml 17 Jan 2003 11:29:22 -0000 1.2
@@ -42,9 +42,6 @@
<sample name="Simple XSP" href="xsp/simple">
Simple XSP example showing usage of several logicsheets.
</sample>
- <sample name="ESQL" href="xsp/esql" xlink:role="dynamic">
- Simple example of the ESQL logicsheet.
- </sample>
<sample name="Session XSP" href="xsp/sessionpage" xlink:role="dynamic">
Sample Session XSP to illustrate session handling.
</sample>
1.6 +55 -45
xml-cocoon2/src/webapp/samples/common/style/xsl/html/simple-samples2html.xsl
Index: simple-samples2html.xsl
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/webapp/samples/common/style/xsl/html/simple-samples2html.xsl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- simple-samples2html.xsl 22 Sep 2002 20:11:11 -0000 1.5
+++ simple-samples2html.xsl 17 Jan 2003 11:29:23 -0000 1.6
@@ -1,6 +1,7 @@
<?xml version="1.0"?>
<!-- Author: Nicola Ken Barozzi "[EMAIL PROTECTED]" -->
<!-- Author: Vadim Gritsenko "[EMAIL PROTECTED]" -->
+<!-- Author: Christian Haul "[EMAIL PROTECTED]" -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xlink="http://www.w3.org/1999/xlink">
<xsl:template match="/">
@@ -13,13 +14,16 @@
<table border="0" cellspacing="2" cellpadding="2" align="center" width="100%">
<tr>
<td width="*"><font face="arial,helvetica,sanserif" color="#000000">The
Apache Software Foundation is proud to present...</font></td>
- <td width="40%" align="center"><img border="0" src="images/cocoon.gif"/></td>
+ <td width="40%" align="center"><img border="0"
src="/cocoon/samples/images/cocoon.gif"/></td>
<td width="30%" align="center"><font face="arial,helvetica,sanserif"
color="#000000"><b>version @version@</b></font></td>
</tr>
<tr>
<table bgcolor="#000000" border="0" cellspacing="2" cellpadding="2"
align="center" width="100%">
<tr>
- <td width="90%" align="right" bgcolor="#0086b2"><i>orthogonal views:
</i></td>
+ <td width="60%" bgcolor="#0086b2">
+ <font size="+1" face="arial,helvetica,sanserif"
color="#ffffff"><xsl:value-of select="samples/@name"/></font>
+ </td>
+ <td align="right" bgcolor="#0086b2"><i>orthogonal views: </i></td>
<td nowrap="nowrap" bgcolor="#ffffff"><a
href="?cocoon-view=content"><i>content</i></a></td>
<td nowrap="nowrap" bgcolor="#ffffff"><a
href="?cocoon-view=pretty-content"><i>pretty content</i></a></td>
<td nowrap="nowrap" bgcolor="#ffffff"><a
href="?cocoon-view=links"><i>links</i></a></td>
@@ -41,51 +45,57 @@
</xsl:template>
<xsl:template match="samples">
- <xsl:variable name="all-samples" select="count(group/sample)"/>
+ <xsl:variable name="gc" select="4"/><!-- group correction -->
+ <xsl:variable name="all-groups" select="$gc * count(group)"/>
+ <xsl:variable name="all-samples"
select="count(group/sample)+count(group/note)+$all-groups"/>
<xsl:variable name="half-samples" select="round($all-samples div 2)"/>
-
<xsl:variable name="half-possibilities">
- <xsl:for-each select="group">
- <xsl:if test="position() < last() and position() >= 1">
- <xsl:variable name="group-position" select="position()"/>
- <xsl:variable name="prev-sample" select="count(../group[position() <=
$group-position - 1]/sample)"/>
- <xsl:variable name="curr-sample" select="count(../group[position() <=
$group-position]/sample)"/>
- <xsl:variable name="next-sample" select="count(../group[position() <=
$group-position + 1]/sample)"/>
- <xsl:variable name="prev-deviation">
- <xsl:choose>
- <xsl:when test="$prev-sample > $half-samples">
- <xsl:value-of select="$prev-sample - $half-samples"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$half-samples - $prev-sample"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="curr-deviation">
- <xsl:choose>
- <xsl:when test="$curr-sample > $half-samples">
- <xsl:value-of select="$curr-sample - $half-samples"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$half-samples - $curr-sample"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="next-deviation">
- <xsl:choose>
- <xsl:when test="$next-sample > $half-samples">
- <xsl:value-of select="$next-sample - $half-samples"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$half-samples - $next-sample"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:if test="$prev-deviation >= $curr-deviation and $curr-deviation
<= $next-deviation">
- <xsl:value-of select="$group-position"/><xsl:text> </xsl:text>
- </xsl:if>
- </xsl:if>
- </xsl:for-each>
+ <xsl:choose>
+ <xsl:when test="count(group) = 1">1 </xsl:when><!-- single group sample.xml
-->
+ <xsl:otherwise>
+ <xsl:for-each select="group">
+ <xsl:if test="position() < last() and position() >= 1">
+ <xsl:variable name="group-position" select="position()"/>
+ <xsl:variable name="prev-sample" select="count(../group[position()
<= $group-position - 1]/sample) + count(../group[position() <= $group-position -
1]/note) + position() * $gc - $gc"/>
+ <xsl:variable name="curr-sample" select="count(../group[position()
<= $group-position]/sample) + count(../group[position() <=
$group-position]/note) + position() * $gc"/>
+ <xsl:variable name="next-sample" select="count(../group[position()
<= $group-position + 1]/sample) + count(../group[position() <= $group-position +
1]/note) + position() * $gc + $gc"/>
+ <xsl:variable name="prev-deviation">
+ <xsl:choose>
+ <xsl:when test="$prev-sample > $half-samples">
+ <xsl:value-of select="$prev-sample - $half-samples"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$half-samples - $prev-sample"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="curr-deviation">
+ <xsl:choose>
+ <xsl:when test="$curr-sample > $half-samples">
+ <xsl:value-of select="$curr-sample - $half-samples"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$half-samples - $curr-sample"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="next-deviation">
+ <xsl:choose>
+ <xsl:when test="$next-sample > $half-samples">
+ <xsl:value-of select="$next-sample - $half-samples"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$half-samples - $next-sample"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:if test="$prev-deviation >= $curr-deviation and $curr-deviation
<= $next-deviation">
+ <xsl:value-of select="$group-position"/><xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:variable>
<xsl:variable name="half">
<xsl:value-of select="substring-before($half-possibilities, ' ')"/>
1.4 +5 -1 xml-cocoon2/src/webapp/samples/chaperon/sitemap.xmap
Index: sitemap.xmap
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/chaperon/sitemap.xmap,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sitemap.xmap 14 Jan 2003 10:36:49 -0000 1.3
+++ sitemap.xmap 17 Jan 2003 11:29:23 -0000 1.4
@@ -98,8 +98,12 @@
<map:match pattern="welcome">
<map:generate src="misc/samples.xml"/>
- <map:transform src="context://samples/stylesheets/simple-samples2html.xsl"/>
+ <map:transform
src="context://samples/common/style/xsl/html/simple-samples2html.xsl"/>
<map:serialize/>
+ </map:match>
+
+ <map:match pattern="images/*">
+ <map:redirect-to uri="../../images/{1}"/>
</map:match>
<!-- ========================= Chaperon ================================ -->
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]