vgritsenko 02/01/15 11:06:37
Modified: src/webapp sitemap.xmap
src/webapp/docs/samples samples.xml
src/webapp/stylesheets simple-samples2html.xsl
Added: src/webapp/docs/samples sample-apps.xml sample-dynamic.xml
sample-static.xml
Log:
Reorganizing samples: split on several pages
Revision Changes Path
1.12 +5 -0 xml-cocoon2/src/webapp/sitemap.xmap
Index: sitemap.xmap
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/webapp/sitemap.xmap,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- sitemap.xmap 14 Jan 2002 12:25:18 -0000 1.11
+++ sitemap.xmap 15 Jan 2002 19:06:37 -0000 1.12
@@ -656,6 +656,11 @@
-->
</map:match>
+ <map:match pattern="sample-*">
+ <map:generate src="docs/samples/samples-{1}.xml"/>
+ <map:transform src="stylesheets/simple-samples2html.xsl"/>
+ <map:serialize/>
+ </map:match>
1.5 +25 -195 xml-cocoon2/src/webapp/docs/samples/samples.xml
Index: samples.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/webapp/docs/samples/samples.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- samples.xml 15 Jan 2002 05:00:01 -0000 1.4
+++ samples.xml 15 Jan 2002 19:06:37 -0000 1.5
@@ -24,218 +24,48 @@
</sample>
</group>
- <group name="Documentation">
- <sample name="Docs" href="documents/index">
- The Cocoon documents.
- </sample>
- <sample name="Tutorial" href="tutorial/home.html">
- A tutorial on Cocoon.
- </sample>
- <sample name="List of docs" href="documents/doclist.html">
- Generated list of all documentation (aggregates each book.xml)
- </sample>
- </group>
-
- <group name="Search">
- <sample name="Search the docs" href="search/welcome">
- Search into the cocoon documentation.
- </sample>
- </group>
-
- <group name="Editor">
- <sample name="Sitemap Editor" href="sitebuilder/openSubSite/">
- Cocoon/JSP based Sitemap Editor.
+ <group name="More Samples">
+ <sample name="Static Content" href="sample-static">
+ How to produce different type of static content.
</sample>
- </group>
- <group name="Entity Catalogs">
- <sample name="Entity resolution using catalogs" href="catalog-demo">
- External entities (e.g. DTDs, symbols, character entity sets, images) are
- resolved to local copies of the resources. The catalog manager
facilitates
- the mapping between public identifiers or system identifiers and other
- system identifiers.
+ <sample name="Dynamic Content" href="sample-dynamic">
+ XSP pages with Cocoon, and other ways of implementing dynamic content.
</sample>
- </group>
- <group name="XML-ized web sites">
- <sample name="java.apache.org" href="sites/java.apache.org">
- This page shows a much more complex example that shows how powerful
- is the style separation and how powerful XML+XSLT can be even for
- web publishing.
+ <sample name="Sources" href="sub/">
+ Samples showing possible ways how to use Cocoon sources in sitemap.
+ (These samples are served by sub-sitemap)
</sample>
- <sample name="jakarta.apache.org" href="sites/jakarta.apache.org">
- This pages shows the XML-ized version of the Apache Jakarta web site.
- </sample>
- </group>
- <group name="News Feeds">
- <sample name="Slashdot" href="slashdot/slashdot.xml">
- Live XML Feed from Slashdot.
- </sample>
- <sample name="Moreover.com" href="moreover/moreover.xml">
- Live XML Developer News Feed from moreover.com.
- </sample>
- <sample name="iSyndicate.com" href="isyndicate/news.xml">
- Live XML News Feed from iSyndicate.com.
+ <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.
</sample>
- <sample name="Aggregation" href="news/aggregate.xml">
- Single Web Page with News from all three sources above.
- </sample>
- </group>
-
- <group name="Static Content">
- <sample name="formatting objects" href="fo">
- This is an example of FO translated to PDF by Apache FOP.
- </sample>
- <sample name="scalable vector graphics" href="svg">
- An example of a SVG file rendered to a PNG image.
- </sample>
- <sample name="slides" href="slides/slides">
- Example of complex XSLT usage.
- </sample>
- <sample name="SVG welcome page" href="welcome-svg">
- A version of this page rendered as a series of SVG
- images embedded within an HTML page. This example
- uses the 'fragment extractor' transformer and generator
- to automatically extract the images and feed them through
- a separate pipeline.
- </sample>
- <sample name="sub sitemap" href="sub/welcome">
- Example of a page served by a sub sitemap.
- </sample>
- </group>
-
- <group name="CC/PP and UAProf">
- <sample name="Quick Start" href="documents/developing/deliquick.html">
- Read this to find out how to enable DELI before trying the test pages.
- </sample>
- <sample name="DELI" href="deli.html">
- Test page for HTML clients.
- </sample>
- <sample name="DELI" href="deli.wml">
- Test page for WAP clients.
- </sample>
</group>
- <group name="Dynamic Content">
- <sample name="Simple XSP" href="xsp/simple">
- Simple XSP example.
- </sample>
- <sample name="Simple Internationalization" href="i18n/simple.xml">
- Sample for Internationalization.
- </sample>
- <sample name="XSP Internationalization" href="i18n/simple.xsp">
- Sample for Internationalization in an XSP.
- </sample>
- <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 ESQL example. You should make sure that you have a database
- and table according to the docs/samples/xsp/esql.xsp and the
- docs/samples/sql/sql-page.xml.sql definitions.
- </sample>
- <sample name="Session XSP" href="session" xlink:role="dynamic">
- Sample Session XSP to illustrate session handling.
- </sample>
- <sample name="File Uploads" href="xsp/upload" xlink:role="dynamic">
- Sample to illustrate File uploads.
- </sample>
- <sample name="Javascript Generator" href="scripts/hello.js">
- An example of the ScriptGenerator producing XML out of a Javascript
program.
- </sample>
- <sample name="JSP Generator" href="jsp/hello">
- An example of the JSPGenerator producing XML out of using JSP.
- </sample>
- <sample name="JSP Reader" href="jsp/welcome.htm">
- An example of the JSPReader producing HTML out of using JSP.
- </sample>
- <sample name="Python Generator" href="scripts/hello.py">
- An example of the ScriptGenerator producing XML out of a Python program.
- You should make sure that you have the Jython interpreter (jython.jar)
from
- www.jython.org in the WEB-INF/lib directory of your Cocoon webapp
context.
- </sample>
- <sample name="Velocity Generator" href="templates/hello-page.vm">
- An example of the VelocityGenerator producing XML out of a Velocity
Template.
- </sample>
- <sample name="Parameterised Redirect"
href="redirect?dest=http://xml.apache.org/">
- An example of redirecting a client based on a request parameter.
+ <group name="Documentation">
+ <sample name="Docs" href="documents/index">
+ The Cocoon documentation.
</sample>
- <sample name="Yahoo Screen Scrape" href="yahoo">
- An example of HTML Generator scraping a part of the Yahoo main page.
+ <sample name="Tutorial" href="tutorial/home.html">
+ A tutorial on Cocoon.
</sample>
- <sample name="Parent Component Manager" href="parentcm">
- An example showing the use of a parent component manager. For this
sample to work,
- Cocoon must have been built with the include.webapp.libs flag set to
true. (Otherwise
- the sample classes are not found.)
+ <sample name="List of docs" href="documents/doclist.html">
+ Generated list of all documentation (aggregates each book.xml)
</sample>
- </group>
-
- <group name="XScript and SOAP">
- <sample name="Simple Sample" href="xscript/simple">
- An simple sample for XScript.
- </sample>
- <sample name="SOAP Stock Quote Example 1" href="xscript/soap-getquote1">
- This page demonstrates the SOAP logicsheet for
- Cocoon. It accesses a SOAP service that provides stock quotes
- and displays the result.
- </sample>
- <sample name="SOAP Sample 2" href="xscript/soap-getquote2">
- This example uses an inline XSLT stylesheet and an
- XScript transform instruction to extract the stock
- price.
- </sample>
- <sample name="SOAP Sample 3" href="xscript/soap-getquote3">
- This is yet another example of the XScript and SOAP
- logicsheets. This sample is very similar with
- SOAP Sample 2, except that the stylesheet is defined in an external
file.
+ <sample name="Slides" href="slides/slides">
+ Presentation shown at ApacheCon 2000. (Example of complex XSLT usage)
</sample>
- </group>
-
- <group name="Web Applications">
- <sample name="Protected Area" href="protected/login">
- An example web-application built around db-authenticator,
- form-validator, session-validator and session-invalidator
- actions.
+ <sample name="Search the docs" href="search/welcome">
+ Search into the cocoon documentation using Apache Lucene.
</sample>
</group>
- <group name="Sample Forms">
- <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
- input and report validation errors to the user through a taglib.
- </sample>
- </group>
-
- <group name="Stateful Applications">
- <sample name="Session State" href="session-state/example">
- Here the application state is stored in a session attribute.
- </sample>
- <sample name="Sessionless State" href="referer/a">
- Whereas this example uses the request header referer
- attribute. The complete URL must be known to the sitemap, so this
- works only if you Cocoon's servlet context is /cocoon.
+ <group name="System Tools And Pages">
+ <sample name="Sitemap Editor" href="sitebuilder/openSubSite/">
+ Cocoon/JSP based Sitemap Editor.
</sample>
- </group>
-
- <group name="System Pages">
<sample name="Status Page" href="status">
Cocoon status page.
</sample>
1.1 xml-cocoon2/src/webapp/docs/samples/sample-apps.xml
Index: sample-apps.xml
===================================================================
<?xml version="1.0" encoding="iso-8859-1"?>
<samples xmlns:xlink="http://www.w3.org/1999/xlink">
<group name="Back">
<sample name="Back" href="welcome">
Back to samples home page
</sample>
</group>
<group name="Web Applications">
<sample name="Protected Area" href="protected/login">
An example web-application built around db-authenticator,
form-validator, session-validator and session-invalidator
actions.
</sample>
</group>
<group name="Stateful Applications">
<sample name="Session State" href="session-state/example">
Here the application state is stored in a session attribute.
</sample>
<sample name="Sessionless State" href="referer/a">
Whereas this example uses the request header referer
attribute. The complete URL must be known to the sitemap, so this
works only if you Cocoon's servlet context is /cocoon.
</sample>
</group>
<group name="Sample Forms">
<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
input and report validation errors to the user through a taglib.
</sample>
</group>
</samples>
1.1 xml-cocoon2/src/webapp/docs/samples/sample-dynamic.xml
Index: sample-dynamic.xml
===================================================================
<?xml version="1.0" encoding="iso-8859-1"?>
<samples xmlns:xlink="http://www.w3.org/1999/xlink">
<group name="Back">
<sample name="Back" href="welcome">
Back to samples home page
</sample>
</group>
<group name="Dynamic Content">
<sample name="Simple Internationalization" href="i18n/simple.xml">
Sample for Internationalization.
</sample>
<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="Javascript Generator" href="scripts/hello.js">
An example of the ScriptGenerator producing XML out of a Javascript
program.
</sample>
<sample name="Python Generator" href="scripts/hello.py">
An example of the ScriptGenerator producing XML out of a Python program.
You should make sure that you have the Jython interpreter (jython.jar)
from
www.jython.org in the WEB-INF/lib directory of your Cocoon webapp context.
</sample>
<sample name="Velocity Generator" href="templates/hello-page.vm">
An example of the VelocityGenerator producing XML out of a Velocity
Template.
</sample>
<sample name="Parameterised Redirect"
href="redirect?dest=http://xml.apache.org/">
An example of redirecting a client based on a request parameter.
</sample>
<sample name="Yahoo Screen Scrape" href="yahoo">
An example of HTML Generator scraping a part of the Yahoo main page.
</sample>
<sample name="Parent Component Manager" href="parentcm">
An example showing the use of a parent component manager. For this sample
to work,
Cocoon must have been built with the include.webapp.libs flag set to
true. (Otherwise
the sample classes are not found.)
</sample>
</group>
<group name="Java Server Pages">
<sample name="JSP Generator" href="jsp/hello">
An example of the JSPGenerator producing XML out of using JSP.
</sample>
<sample name="JSP Reader" href="jsp/welcome.htm">
An example of the JSPReader producing HTML out of using JSP.
</sample>
</group>
<group name="eXtensible Server Pages">
<sample name="Simple XSP" href="xsp/simple">
Simple XSP example.
</sample>
<sample name="XSP Internationalization" href="i18n/simple.xsp">
Sample for Internationalization in an XSP.
</sample>
<sample name="ESQL" href="xsp/esql" xlink:role="dynamic">
Simple ESQL example.
</sample>
<sample name="Session XSP" href="session" xlink:role="dynamic">
Sample Session XSP to illustrate session handling.
</sample>
<sample name="File Uploads" href="xsp/upload" xlink:role="dynamic">
Sample to illustrate file uploads.
</sample>
</group>
<group name="XScript and SOAP">
<sample name="Simple Sample" href="xscript/simple">
An simple sample for XScript.
</sample>
<sample name="SOAP Stock Quote Example 1" href="xscript/soap-getquote1">
This page demonstrates the SOAP logicsheet for
Cocoon. It accesses a SOAP service that provides stock quotes
and displays the result.
</sample>
<sample name="SOAP Sample 2" href="xscript/soap-getquote2">
This example uses an inline XSLT stylesheet and an
XScript transform instruction to extract the stock
price.
</sample>
<sample name="SOAP Sample 3" href="xscript/soap-getquote3">
This is yet another example of the XScript and SOAP
logicsheets. This sample is very similar with
SOAP Sample 2, except that the stylesheet is defined in an external
file.
</sample>
</group>
<group name="Aggregation Sample">
<sample name="Slashdot" href="slashdot/slashdot.xml">
Live XML Feed from Slashdot.
</sample>
<sample name="Moreover.com" href="moreover/moreover.xml">
Live XML Developer News Feed from moreover.com.
</sample>
<sample name="iSyndicate.com" href="isyndicate/news.xml">
Live XML News Feed from iSyndicate.com.
</sample>
<sample name="Aggregation" href="news/aggregate.xml">
Single Web Page with News from all three sources above.
</sample>
</group>
</samples>
1.1 xml-cocoon2/src/webapp/docs/samples/sample-static.xml
Index: sample-static.xml
===================================================================
<?xml version="1.0" encoding="iso-8859-1"?>
<samples xmlns:xlink="http://www.w3.org/1999/xlink">
<group name="Back">
<sample name="Back" href="welcome">
Back to samples home page
</sample>
</group>
<group name="XML-ized web sites">
<sample name="java.apache.org" href="sites/java.apache.org">
This page shows a much more complex example that shows how powerful
is the style separation and how powerful XML+XSLT can be even for
web publishing.
</sample>
<sample name="jakarta.apache.org" href="sites/jakarta.apache.org">
This pages shows the XML-ized version of the Apache Jakarta web site.
</sample>
</group>
<group name="XML Entity Catalogs">
<sample name="Entity Resolution Using Catalogs" href="catalog-demo">
External entities (e.g. DTDs, symbols, character entity sets, images) are
resolved to local copies of the resources. The catalog manager facilitates
the mapping between public identifiers or system identifiers and other
system identifiers.
</sample>
</group>
<group name="CC/PP and UAProf">
<sample name="Quick Start" href="documents/developing/deliquick.html">
Read this to find out how to enable DELI before trying the test pages.
</sample>
<sample name="DELI" href="deli.html">
Test page for HTML clients.
</sample>
<sample name="DELI" href="deli.wml">
Test page for WAP clients.
</sample>
</group>
<group name="Static Content">
<sample name="Formatting Objects" href="fo">
This is an example of XML-FO document translated into PDF by Apache FOP.
</sample>
<sample name="Scalable Vector Graphics" href="svg">
An example of an SVG document rendered into a PNG image.
</sample>
<sample name="SVG Welcome Page" href="welcome-svg">
A version of this page rendered as a series of SVG
images embedded within an HTML page. This example
uses the 'fragment extractor' transformer and generator
to automatically extract the images and feed them through
a separate pipeline.
</sample>
</group>
</samples>
1.2 +3 -3
xml-cocoon2/src/webapp/stylesheets/simple-samples2html.xsl
Index: simple-samples2html.xsl
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/webapp/stylesheets/simple-samples2html.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- simple-samples2html.xsl 3 Jan 2002 12:31:46 -0000 1.1
+++ simple-samples2html.xsl 15 Jan 2002 19:06:37 -0000 1.2
@@ -29,13 +29,13 @@
<xsl:template match="samples">
<xsl:variable name="all-samples" select="count(group/sample)"/>
<xsl:variable name="half-samples" select="round($all-samples div 2)"/>
-
+
<table width="100%">
<tr>
<td width="50%" valign="top">
<xsl:for-each select="group">
<xsl:variable name="group-position" select="position()"/>
- <xsl:variable name="current-sample" select="1 +
count(../group[position() <= $group-position]/sample)"/>
+ <xsl:variable name="current-sample" select="count(../group[position()
<= $group-position]/sample)"/>
<xsl:choose>
<xsl:when test="$current-sample <= $half-samples">
<table border="0" bgcolor="#000000" cellpadding="0" cellspacing="0"
width="97%">
@@ -72,7 +72,7 @@
<td valign="top">
<xsl:for-each select="group"> <!-- [position()<=$half] -->
<xsl:variable name="group-position" select="position()"/>
- <xsl:variable name="current-sample" select="1 +
count(../group[position() <= $group-position]/sample)"/>
+ <xsl:variable name="current-sample" select="count(../group[position()
<= $group-position]/sample)"/>
<xsl:choose>
<xsl:when test="not($current-sample <= $half-samples)">
<table border="0" bgcolor="#000000" cellpadding="0" cellspacing="0"
width="97%">
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]