You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2001/10/04 09:42:02 UTC
cvs commit: xml-cocoon2/documentation/xdocs/drafts cocoon-working-draft.xconf cocoon2-docbook.xml sitemap-working-draft.xmap sitemap-working-draft.xsd
cziegeler 01/10/04 00:42:02
Modified: . build.xml
documentation sitemap.xmap
documentation/xdocs book.xml
Added: documentation/xdocs/drafts cocoon-working-draft.xconf
cocoon2-docbook.xml sitemap-working-draft.xmap
sitemap-working-draft.xsd
Removed: documentation/xdocs site-book.xml
Log:
Updated doc build system: added download, cleaned up book and added upto-date check
Revision Changes Path
1.73 +42 -4 xml-cocoon2/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/build.xml,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- build.xml 2001/10/02 08:31:56 1.72
+++ build.xml 2001/10/04 07:42:01 1.73
@@ -1218,26 +1218,64 @@
</target>
<!-- =================================================================== -->
- <!-- The documentation system (very alpha...) -->
+ <!-- Prepares the docs -->
<!-- =================================================================== -->
- <target name="newdocs" depends="prepare,package">
+ <target name="prepare-newdocs" depends="init">
<mkdir dir="${build.context}"/>
<mkdir dir="${build.context}/images"/>
<mkdir dir="${build.docs}"/>
<mkdir dir="${build.dir}/work"/>
+ <!-- make filtered copy of XML docs -->
<copy todir="${build.context}" filtering="on">
<fileset dir="${context.dir}">
<exclude name="images/**"/>
</fileset>
</copy>
- <copy file="changes.xml" tofile="${build.context}/changes.xml" filtering="on"/>
- <copy file="todo.xml" tofile="${build.context}/todo.xml" filtering="on"/>
+ <!-- Add changes and todo -->
+ <copy file="changes.xml" tofile="${build.context}/xdocs/changes.xml" filtering="on"/>
+ <copy file="todo.xml" tofile="${build.context}/xdocs/todo.xml" filtering="on"/>
+ <replace file="${build.context}/xdocs/changes.xml" token="./xdocs/dtd/" value="dtd/"/>
+ <replace file="${build.context}/xdocs/todo.xml" token="./xdocs/dtd/" value="dtd/"/>
+
+ <!-- Copy images -->
<copy todir="${build.context}/images" filtering="off">
<fileset dir="${context.dir}/images"/>
</copy>
+
+ </target>
+
+
+ <!-- =================================================================== -->
+ <!-- Set a variable if the generated docs are already up-to-date. -->
+ <!-- =================================================================== -->
+ <target name="newdocs_check" depends="init">
+ <uptodate property="newdocs.notrequired" targetfile="${build.docs}/index.html" >
+ <srcfiles dir="." includes="changes.xml,todo.xml"/>
+ <srcfiles dir="${context.dir}/xdocs" includes="*.xml" excludes="${site.projfile}"/>
+ </uptodate>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- If generated docs is already up-to-date, print a message saying so. -->
+ <!-- =================================================================== -->
+ <target name="newdocs_done" if="newdocs.notrequired">
+ <echo message="-------------------------------------------------------------"/>
+ <echo message="Not rebuilding docs, as they are up-to-date:"/>
+ <echo message=" ${build.docs}/index.html is more recent than"/>
+ <echo message=" todo.xml, changes.xml, ${context.dir}/xdocs/*.xml"/>
+ <echo message="-------------------------------------------------------------"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- The documentation system (nearly beta...) -->
+ <!-- =================================================================== -->
+ <target name="newdocs"
+ depends="package, prepare-newdocs, newdocs_check, newdocs_done"
+ unless="newdocs.notrequired"
+ description="Generates the documentation">
<java classname="org.apache.cocoon.Main" fork="true" dir="${build.context}">
<arg value="-c."/>
1.11 +2 -2 xml-cocoon2/documentation/sitemap.xmap
Index: sitemap.xmap
===================================================================
RCS file: /home/cvs/xml-cocoon2/documentation/sitemap.xmap,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- sitemap.xmap 2001/10/02 13:27:49 1.10
+++ sitemap.xmap 2001/10/04 07:42:01 1.11
@@ -65,14 +65,14 @@
</map:match>
<map:match pattern="body-todo.xml">
- <map:generate src="todo.xml"/>
+ <map:generate src="xdocs/todo.xml"/>
<map:transform src="stylesheets/todo2document.xsl"/>
<map:transform src="stylesheets/document2html.xsl"/>
<map:serialize/>
</map:match>
<map:match pattern="body-changes.xml">
- <map:generate src="changes.xml"/>
+ <map:generate src="xdocs/changes.xml"/>
<map:transform src="stylesheets/changes2document.xsl"/>
<map:transform src="stylesheets/document2html.xsl"/>
<map:serialize/>
1.4 +20 -19 xml-cocoon2/documentation/xdocs/book.xml
Index: book.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/documentation/xdocs/book.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- book.xml 2001/10/02 15:01:55 1.3
+++ book.xml 2001/10/04 07:42:01 1.4
@@ -11,29 +11,30 @@
</menu>
<menu label="Install">
- <menu-item label="Install" href="installing.html" xlink:role="install"/>
- <menu-item label="Jars" href="jars.html" xlink:role="install"/>
+ <external label="Download" href="http://xml.apache.org/cocoon2/dist"/>
+ <menu-item label="Install" href="installing.html"/>
+ <menu-item label="Jars" href="jars.html"/>
</menu>
- <menu label="Cocoon 2">
- <menu-item id="overview" label="Overview" href="overview.html"/>
- <menu-item id="uc2" label="Concepts" href="uc2.html"/>
- <menu-item id="sitemap" label="Sitemap" href="sitemap.html"/>
- <menu-item id="views" label="Views" href="views.html"/>
- <menu-item id="actions" label="Actions" href="actions.html"/>
- <menu-item id="matchers-selectors" label="Matchers and Selectors" href="matchers_selectors.html"/>
+ <menu label="Cocoon">
+ <menu-item label="Overview" href="overview.html"/>
+ <menu-item label="Concepts" href="uc2.html"/>
+ <menu-item label="Sitemap" href="sitemap.html"/>
+ <menu-item label="Views" href="views.html"/>
+ <menu-item label="Actions" href="actions.html"/>
+ <menu-item label="Matchers and Selectors" href="matchers_selectors.html"/>
<menu-item label="User Documentation" href="userdocs/index.html"/>
- <menu-item id="flow" label="Flow" href="httprequest.html"/>
- <menu-item id="caching" label="Caching" href="caching.html"/>
- <menu-item id="mrustore" label="MRUMemoryStore" href="mrustore.html"/>
- <menu-item id="storejanitor" label="StoreJanitor" href="storejanitor.html"/>
- <menu-item id="sessions" label="Sessions" href="sessions.html"/>
- <menu-item id="catalog" label="Entity Catalogs" href="catalog.html"/>
- <menu-item id="datasources" label="Using Databases" href="datasources.html"/>
- <menu-item id="extending" label="Extending C2" href="extending.html"/>
- <menu-item id="avalon" label="Avalon" href="avalon.html"/>
- <menu-item id="parent-component-manager" label="Parent CM" href="parent-component-manager.html"/>
+ <menu-item label="Flow" href="httprequest.html"/>
+ <menu-item label="Caching" href="caching.html"/>
+ <menu-item label="MRUMemoryStore" href="mrustore.html"/>
+ <menu-item label="StoreJanitor" href="storejanitor.html"/>
+ <menu-item label="Sessions" href="sessions.html"/>
+ <menu-item label="Entity Catalogs" href="catalog.html"/>
+ <menu-item label="Using Databases" href="datasources.html"/>
+ <menu-item label="Extending C2" href="extending.html"/>
+ <menu-item label="Avalon" href="avalon.html"/>
+ <menu-item label="Parent CM" href="parent-component-manager.html"/>
</menu>
<menu label="Developer Documentation">
1.1 xml-cocoon2/documentation/xdocs/drafts/cocoon-working-draft.xconf
Index: cocoon-working-draft.xconf
===================================================================
<?xml version="1.0"?>
<!-- =============== Cocoon Sitemap Working Draft ============================
Copyright (C) 2000 The Apache Software Foundation. All rights reserved.
Redistribution of this document is permitted provided that the following
conditions are met:
1. Redistributions must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. This document is referred to and considered only as "working draft".
3. Any software implementation inspired by this document must indicate
in its documentation:
"inspired by research and development on behalf of the
Apache Software Foundation"
4. The names "Cocoon" and "Apache Software Foundation" must not be used to
endorse or promote products inspired from this document without prior
written permission. For written permission, please contact
apache@apache.org.
5. Products derived from this document may not be called "Cocoon", nor may
"Cocoon" nor "Apache" appear in their name, without prior written
permission of the Apache Software Foundation.
THIS DOCUMENT IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This document consists of voluntary contributions made by many individuals
on behalf of the Apache Software Foundation. For more information on the
Apache Software Foundation, please see <http://www.apache.org/>.
==============================================================================
This document contains an example used as a working draft for
Cocoon architects to test and understand the issues associated with
sitemaps and XML publishing in general. It must be considered as a working
draft and may be updated at any time.
-->
<cocoon
xmlns="http://xml.apache.org/cocoon/2.0"
xmlns:src="http://xml.apache.org/cocoon/loaders/1.0"
>
<!-- NOTE (SM): what should we place here? -->
<sitemap src:file="/home/www/sitemap.xmap"/>
</components>
1.1 xml-cocoon2/documentation/xdocs/drafts/cocoon2-docbook.xml
Index: cocoon2-docbook.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd" []>
<!--
<!DOCTYPE article
PUBLIC "-//Norman Walsh//DTD Simplified DocBook XML V4.0.1//EN"
"http://nwalsh.com/docbook/simple/4.0.1/sdocbook.dtd">
-->
<book>
<bookinfo>
<title>Cocoon 2</title>
<authorgroup>
<author>
<firstname>Stefano</firstname>
<surname>Mazzocchi</surname>
<affiliation>
<orgname>The Apache Group</orgname>
<address>
<email>stefano@apache.org</email>
<otheraddr>http://xml.apache.org</otheraddr>
</address>
</affiliation>
</author>
</authorgroup>
<abstract>
<title>The Apache XML Project</title>
<para>
This document describes the Cocoon project, and its role within the
Apache Group's Java XML project.
</para>
</abstract>
<revhistory>
<revision>
<revnumber>0.01</revnumber>
<date>28 May 2000</date>
<revremark>DocBook markup</revremark>
</revision>
</revhistory>
</bookinfo>
<chapter>
<title>The Cocoon Project</title>
<sect1>
<title>A new look</title>
<para>
The Cocoon Project will evidence its new course with a new logo that was
designed by Cocoon's creator Stefano Mazzocchi. Here it is:
</para>
<figure>
<title>The new Cocoon Logo</title>
<graphic fileref="cocoon2.gif"></graphic>
</figure>
</sect1>
<sect1>
<title>Introduction</title>
<para>
The Cocoon Project has gone a long way since it's creation on January 1999.
It started as a simple servlet for static XSL styling and became more and
more powerful as new features were added. Unfortunately, design decisions
made early in the project influenced its evolution. Today, some of those
constraints that shaped the project were modified as XML standards have
evolved and solidified. For this reason, those design decisions need to be
reconsidered under this new light.
</para>
<para>
While Cocoon started as a small step in the direction of a new web
publishing idea based on better design patterns and reviewed estimations of
management issues, the technology used was not mature enough for tools to
emerge. Today, most web engineers consider XML as the key for an improved
web model and web site managers see XML as a way to reduce costs and ease
production.
</para>
<para>
In an era where services rather than software will be key for economical
success, a better and less expensive model for web publishing will be a
winner, especially if based on open standards.
</para>
</sect1>
<sect1>
<title>Passive APIs vs. Active APIs</title>
<para>
Web serving environments must be fast and scalable to be useful. Cocoon1
was born as a "proof of concept" rather than a production
software and had significant design restrictions based mainly on the
availability of freely redistributable tools. Other issues were lack of
detailed knowledge on the APIs available as well as underestimation of the
project success, being created as a way to learn XSL rather than a full
publishing system capable of taking care of all XML web publishing
needs.
</para>
<para>
For the above reasons, Cocoon1 was based on the DOM level 1 API which is a
<emphasis>passive</emphasis> API and was intended mainly for client side
operation. This is mainly due to the fact that most DOM implementations
require the document to reside in memory. While this is practical for small
documents and thus good for the "proof of concept" stage, it is
now considered a main design constraint for Cocoon scalability.
</para>
<para>
Since the goal of Cocoon2 is the ability to process simultaneously multiple
100Mb documents in JVM with a few Mbs of heap size, careful memory use and
tuning of internal components is a key issue. To reach this goal, an
improved API model was needed. This is now identified in the SAX API which
is, unlike DOM, event based (so <emphasis>active</emphasis>, in the sense
that its design is based the <emphasis>inversion of control</emphasis>
principle).
</para>
<para>
The event model allows document producers to trigger producing events that
get handled in the various processing stages and get finally formatted in
the response stream. This has significant impacts on performance and memory
needs:
</para>
<itemizedlist>
<listitem>
<para>
incremental operation
</para>
<para>
the response is created during document production. Client's perceived
performance is dramatically improved since clients can start receiving
data as soon as it is created, not after all processing stages have
been performed. In those cases where incremental operation is not
possible (for example, element sorting), internal buffers store the
events until the operation can be performed. However, even in these
cases performance can be increased with the use of tuned memory
structures.
</para>
</listitem>
<listitem>
<para>
lowered memory consumption
</para>
<para>
since most of the server processing required in Cocoon is incremental,
an incremental model allows XML production events to be transformed
directly into output events and character written on streams, thus
avoiding the need to store them in memory.
</para>
</listitem>
<listitem>
<para>
easier scalability
</para>
<para>
reduce memory needs allow more concurrent operation to be possible,
thus allowing the publishing system to scale as the load increases.
</para>
</listitem>
<listitem>
<para>
more optimizable code model
</para>
<para>
modern virtual machines are based on the idea of <emphasis>hot
spots</emphasis>, code fragments that are used often and, if optimized,
increase the process execution by far. This new event model allows
easier detection of hot spots since it's a method driven operation,
rather than a memory driven one. Hot methods can be identified earlier
and their optimization performed better.
</para>
</listitem>
<listitem>
<para>
reduced garbage collection
</para>
<para>
even the most advanced and lightweight DOM implementation require at
least three to five times (and sometimes much more than this) more
memory than original document size. This does not only reduce the
scalability of the operation, but also impact overall performance by
increasing the number of memory garbage that must be collected after
the response in sent to the client. Even if modern virtual machines
reduced the overhead of garbage collection, less garbage will always
have performance and scalability impacts.
</para>
</listitem>
</itemizedlist>
<para>
The above points, alone, would be enough for the Cocoon2 paradigm shift,
even if this event based model impacts not only the general architecture of
the publishing system but also its internal processing components such as
XSLT processing and PDF formatting. These components will require
substantial work and maybe design reconsideration to be able to follow a
pure event-based model. The Cocoon Project will work closely with the other
component projects to be able to influence their operation in this
direction.
</para>
</sect1>
<sect1>
<title>Reactors Reconsidered</title>
<para>
Another design choice that should be revised is the reactor pattern that
was introduced to allow components to be connected in more flexible way. In
fact, opposed to the fixed pipe model used up to Cocoon 1.3.1, the reactor
approach allows components to be dynamically connected, depending on
reaction instructions introduced inside the documents.
</para>
<para>
While this at first seemed a very advanced and highly appealing model, it
turned out to be a very dangerous approach. The first concern is mainly
technical: porting the reactor pattern under an event-based model requires
limitations and tradeoffs since the generated events must be cached until a
reaction instruction is encountered.
</para>
<para>
But even if the technical difficulties are solved, a key limitation
remains: there is no single point of management.
</para>
</sect1>
<sect1>
<title>Management Considerations</title>
<para>
The web was created to reduce information management costs by distributing
them back on information owners. While this model is great for user
communities (scientists, students, employees, or people in general) each of
them managing small amount of personal information, it becomes impractical
for highly centralized information systems where <emphasis>distributed
management</emphasis> is simply not practical.
</para>
<para>
While in the HTML web model the page format and URL names where the only
necessary contracts between individuals to create a world wide web, in more
structured information systems the number of contracts increases by a
significant factor due to the need of coherence between the hosted
information: common style, common design issues, common languages, server
side logic integration, data validation, etc...
</para>
<para>
It is only under this light that XML and its web model reveal their power:
the HTML web model had too little contracts to be able to develop a
structured and more coherent distributed information system, reason that is
mainly imposed by the lack of good and algorithmically certain information
indexing and knowledge seeking. Lacks that tend to degrade the quality of
the truly distributed web in favor of more structured web sites (that based
their improved site structure on internal contracts).
</para>
<para>
The simplification and engineering of web site management is considered one
of the most important Cocoon2 goals. This is done mainly by technologically
imposing a reduced number of contracts and place them in a hierarchical
shape suitable to replace current high-structure web site management
models.
</para>
<para>
The model that Cocoon2 adopts is the "pyramid model of web
contracts" which is outlined in the picture below
</para>
<figure>
<title>The Cocoon2 Pyramid Model of Contracts</title>
<graphic fileref="pyramid-model.gif"></graphic>
</figure>
<para>
and is composed by four different working contexts (the rectangles)
</para>
<itemizedlist>
<listitem>
<para>
Management
</para>
<para>
the people that decide what the site should contain, how it should
behave and how it should appear
</para>
</listitem>
<listitem>
<para>
Content
</para>
<para>
the people responsible to write, own and manage the site content. This
context may contain several sub-contexts one for each language used to
express page content.
</para>
</listitem>
<listitem>
<para>
Logic
</para>
<para>
the people responsible for integration with dynamic content generation
technologies and database systems.
</para>
</listitem>
<listitem>
<para>
Style
</para>
<para>
the people responsible for information presentation, look & feel,
site graphics and its maintenance.
</para>
</listitem>
</itemizedlist>
<para>
and five contracts (the lines)
<simplelist>
<member>management - content</member>
<member>management - logic</member>
<member>management - style</member>
<member>content - logic</member>
<member>content - style</member>
</simplelist>
</para>
<para>
note that there is no <emphasis>logic - style</emphasis> contract. Cocoon2
aims to provide both software and guidelines to allow you to remove such
contract.
</para>
</sect1>
<sect1>
<title>Overlapping contexts and Chain Mapping</title>
<para>
The above model can be applied only if the different contexts never
overlap, otherwise there is no chance of having a single management point.
For example, if the W3C-recommended method to link stylesheets to XML
documents is used, the content and style contexts overlap and it's
impossible to change the styling behavior of the document without changing
it. The same is true for the processing instructions used by the Cocoon1
reactor to drive the page processing: each stage concur to determine the
result thus increasing management and debug complexity. Another overlapping
in context contracts is the need for URL-encoded parameters to drive the
page output. These overlaps break the pyramid model and increase the
management costs.
</para>
<para>
In Cocoon2, the reactor pattern will be abandoned in favor of a pipeline
mapping technique. This is based on the fact that the number of different
contracts is limited even for big sites and grows with a rate that is
normally much less than its size.
</para>
<para>
Also, for performance reasons, Cocoon2 will try to compile everything that
is possibly compilable (pages/XSP into producers, stylesheets into
processors, etc...) so, in this new model, the <emphasis>processing
chain</emphasis> that generates the page contains (in a direct executable
form) all the information/logic that handles the requested resource to
generate its response.
</para>
<para>
This means that instead of using even-driven request-time DTD
interpretation (done in all Cocoon1 processors), these will be either
compiled into processors directly (XSLT stylesheet compilation) or compiled
into producers using logicsheets and XSP which will remove totally the need
for request-time interpretation solutions like DCP that will be removed.
</para>
<note>
<para>
Some of these features are already present in latest Cocoon 1.x releases
but the Cocoon2 architecture will make them central to its new core
</para>
</note>
</sect1>
<sect1>
<title>Sitemap</title>
<para>
In Cocoon2 terminology, a <emphasis>sitemap</emphasis> is the collection of
pipeline matching informations that allow the Cocoon engine to associate
the requested URI to the proper response-producing pipeline.
</para>
<para>
The sitemap physically represents the central repository for web site
administration, where the URI space and its handling is maintained. An
example of the sitemap is given below:
</para>
<programlisting>
<![CDATA[
<source>
<sitemap>
<process match="/press/en/*.html">
<generator type="file" src="/docs/english/press/*.xml"/>
<filter type="xslt">
<parameter name="stylesheet" value="/styles/simple-press-html.xsl"/>
</filter>
<serializer type="html"/>
</process>
<process match="/press/en/*.pdf">
<generator type="file" src="/docs/english/press/*.xml"/>
<filter type="xslt">
<parameter name="stylesheet" value="/styles/simple-press-pdf.xsl"/>
</filter>
<serializer type="pdf"/>
</process>
<process match="/">
<matcher type="agent">
<parameter name="name" value="Mozilla/5.0">
</matcher>
<generator type="file" src="/docs/root.xml"/>
<filter type="xslt">
<parameter name="stylesheet" value="/styles/fancy-XUL-view.xsl"/>
</filter>
<serializer type="html"/>
</process>
<process match="/">
<matcher type="agent">
<parameter name="capability" value="text/vnd.wap.wml">
</matcher>
<generator type="file" src="/docs/root.xml"/>
<filter type="xslt">
<parameter name="stylesheet" value="/styles/WAP-view.xsl"/>
</filter>
<serializer type="wap"/>
</process>
<process match="/">
<generator type="file" src="/docs/root.xml"/>
<filter type="xslt">
<parameter name="stylesheet" value="/styles/normal-view.xsl"/>
</filter>
<serializer type="html"/>
</process>
</sitemap>
</source>
]]>
</programlisting>
<note>
<para>
The sitemap DTD has not yet been standardized and it's not guaranteed to
solidify until Cocoon 2.0 is out final. So, the above should be
considered just as a preview and not a specification or even a working
draft. For more information dig into the development mail list digests.
</para>
</note>
</sect1>
<sect1>
<title>Pre-compilation, Pre-generation and Caching</title>
<para>
The cache system in Cocoon1 will be ported with no important design changes
since it's very flexible and was not polluted by early design constraints
since it appeared in later versions. The issue regards static file caching
that, no matter what, will always be slower than direct web server caching.
</para>
<para>
To be able to put most of the static part job back on the web server (where
it belongs), Cocoon2 will greatly improve it's command line operation,
allowing the creation of <emphasis>site makefiles</emphasis> that will
automatically scan the web site and the source documents and will provide a
way to <emphasis>regenerate</emphasis> the static part of a web site
(images and tables included!) based on the same XML model used in the
dynamic operation version.
</para>
<para>
Cocoon2 will, in fact, be the integration between Cocoon1 and Stylebook.
</para>
<para>
It will be up to the web server administrator to use static regeneration
capabilities on a time basis, manually or triggered by some particular
event (database update signal) since Cocoon2 will only provide servlet and
command line capabilities. The nice integration is based on the fact that
there will be no behavioral difference if the files are dynamically
generated in Cocoon2 via the servlet operation and cached internally or
pre-generated and served directly by the web server, as long as URI
contracts are kept the same by the system administrator (via URL-rewriting
or aliasing)
</para>
<para>
Also, it will be possible to avoid on-fly page and stylesheet compilation
(which make debugging harder) with command line pre-compilation hooks that
will work like normal compilers from a developer's point of view.
</para>
</sect1>
<sect1>
<title>Development Status</title>
<para>
Cocoon2 development already started, but should be considered of pre-alpha
quality. If you dare, you might take a look at it on the
<emphasis>xml-cocoon2</emphasis> CVS branch in the Cocoon CVS module, or,
if you are not a CVS expert, this means typing:
</para>
<para>
<command>
cvs checkout -r xml-cocoon2 xml-cocoon
</command>
</para>
<para>
For more information on CVS access, refer to the CVS-howtos on this web
site.
</para>
</sect1>
</chapter>
</book>
1.1 xml-cocoon2/documentation/xdocs/drafts/sitemap-working-draft.xmap
Index: sitemap-working-draft.xmap
===================================================================
<?xml version="1.0"?>
<!-- =============== Cocoon Sitemap Working Draft ============================
Copyright (C) 2000 The Apache Software Foundation. All rights reserved.
Redistribution of this document is permitted provided that the following
conditions are met:
1. Redistributions must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. This document is referred to and considered only as "working draft".
3. Any software implementation inspired by this document must indicate
in its documentation:
"inspired by research and development on behalf of the
Apache Software Foundation"
4. The names "Cocoon" and "Apache Software Foundation" must not be used to
endorse or promote products inspired from this document without prior
written permission. For written permission, please contact
apache@apache.org.
5. Products derived from this document may not be called "Cocoon", nor may
"Cocoon" nor "Apache" appear in their name, without prior written
permission of the Apache Software Foundation.
THIS DOCUMENT IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This document consists of voluntary contributions made by many individuals
on behalf of the Apache Software Foundation. For more information on the
Apache Software Foundation, please see <http://www.apache.org/>.
==============================================================================
This document contains an example used as a working draft for
Cocoon architects to test and understand the issues associated with
sitemaps and XML publishing in general. It must be considered as a working
draft and may be updated at any time.
This document is based on ideas and design patterns inspired by Stefano
Mazzocchi <st...@apache.org> and Pierpaolo Fumagalli <pi...@apache.org>
but grew as a collaborative effort to provide a solid foundation of
design patterns and usability guidelines to the Cocoon Publishing
Framework.
The goal of the sitemap is to allow non-programmers to create web sites
and web applications built from logic components and XML documents.
It finds inspiration from both Apache's httpd.conf/.htaccess files as well
as from Servlet API 2.2 WAR archives. It uses concepts such as Cascading
from W3C CSS, as well as declarative approaches integrated into the W3C
XSLT language. It also uses some element/attribute equivalence patterns
used in W3C RDF.
The following goals were identified as engineering constraints:
- minimal verbosity is of maximum importance.
- the schema should be sufficiently expressive to allow learning by
examples.
- sitemap authoring should not require assistive tools, but be
sufficiently future-compatible to allow them.
- sitemaps must scale along with the site and should not impose growth
limitation to the site as a whole nor limit its administration with size
increase.
- sitemaps should contain all the information required to Cocoon to
generate all the requests it receives.
- sitemaps should contain information for both dynamic operation as
well as offline static generation.
- uri mapping should be powerful enough to allow every possible mapping
need.
- basic web-serving functionalities (redirection, error pages,
resource authorisation) should be provided.
- sitemaps should not limit Cocoon's intrinsic modular extensibility.
- resources must be matched with all possible state variables, not
only with URI (http parameters, enviornment variables, server
parameters, time, etc...).
- sitemaps should embed the notion of "semantic resources" to be
future-compatible with sematic crawling and indexing.
- sitemaps should be flexible enough to allow a complete web site to
be built with Cocoon.
- sitemaps should include the notion of "multi-dimensional resource views"
even if HTTP doesn't provide them explicitly.
- sitemaps should include the ability to provide resource creation tracing
and error handling.
The default namespaces are used mainly for versioning, instead of using
attributes such as version="1.0" which could create confusion. People are
used to writing URIs with no spelling mistakes, while versioning could be
used for their own sitemap versions and this might break operation.
The versioning schema will be "major.minor" where major will be increased
by one each time a new release breaks back compatibility, while minor
is increased each time a change has been made that doesn't create
back incompatible problems.
The syntax
<xxx map:value="yyy">
is completely equivalent to
<xxx>yyy</xxx>
throughout the entire sitemap.
============================================================================ -->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xsi:schemaLocation="sitemap-working-draft.xsd">
<!-- xsi:schemaLocation="http://apache.org/cocoon/sitemap/1.0/schema"> -->
<!-- =========================== Components ================================ -->
<map:components>
<!--
Generators generate XML content as SAX events and initialize the
pipeline processing.
-->
<map:generators default="parser">
<map:generator name="parser" src="class:///org.apache.cocoon.generation.FileGenerator" label="content"/>
<map:generator name="dir" src="file:///home/mystuff/java/MyDirGenerator.class" label="content"/>
<map:generator name="serverpages" src="class:///org.apache.cocoon.generation.XSPGenerator" label="content">
...
</map:generator>
</map:generators>
<!--
Transformers transform SAX events in SAX events.
-->
<map:transformers default="xslt">
<map:transformer name="xslt" src="class:///org.apache.cocoon.transformation.XSLTTransformer">
<compile-stylesheets map:value="true"/>
</map:transformer>
<map:transformer name="xinclude" src="class:///org.apache.cocoon.transformation.XIncludeTransformer" label="content"/>
<map:transformer name="schema" src="class:///org.apache.cocoon.transformation.SchemaLoader"/>
<map:transformer name="rdf" src="class:///org.apache.cocoon.transformation.RDFizer"/>
</map:transformers>
<!--
Readers generate and serialize directly from a resource in binary or char streams for
final client consumption.
-->
<map:readers default="binary">
<map:reader name="binary" mime-type="image/svg" src="class:///org.apache.cocoon.reading.BinaryReader"/>
</map:readers>
<!--
Serializers serialize SAX events in binary or char streams for
final client consumption.
-->
<map:serializers default="html">
<map:serializer name="html" mime-type="text/html" src="class:///org.apache.cocoon.serialization.HTMLSerializer">
<doctype-public map:value="-//W3C//DTD HTML 4.0 Transitional//EN"/>
<doctype-system map:value="http://www.w3.org/TR/REC-html40/loose.dtd"/>
<preserve-space map:value="true"/>
<encoding map:value="UTF-8"/>
<indent tab="8">1</indent>
<colors>
<foreground map:value="white"/>
<borders>
<left map:value="blue"/>
<right>red</right>
</borders>
<text>black</text>
<lines>
<left map:value="cyan"/>
<right>orange</right>
</lines>
<background>green</background>
</colors>
<map:param name="foo" value="bar"/>
<map:param name="baz">foobar</map:param>
<line-width map:value="120"/>
</map:serializer>
<map:serializer name="wap" mime-type="text/vnd.wap.wml" src="class:///org.apache.cocoon.serialization.XMLSerializer">
<doctype-public>-//WAPFORUM//DTD WML 1.1//EN</doctype-public>
<doctype-system>http://www.wapforum.org/DTD/wml_1.1.xml</doctype-system>
<encoding>UTF-8</encoding>
</map:serializer>
<map:serializer name="svg2jpg" mime-type="image/jpg" src="class:///org.apache.cocoon.serialization.SVGSerializer">
<format map:value="jpg"/>
<compression-level>80%</compression-level>
</map:serializer>
<map:serializer name="svg2png" mime-type="image/png" src="class:///org.apache.cocoon.serialization.SVGSerializer">
<format>png</format>
<color-depth map:value="24"/>
</map:serializer>
</map:serializers>
<!--
Selectors are classes that contain programming logic that perform
boolean evaluation based on enviornment state during the call (state
includes request parameters, machine state as well as any other
accessible information)
Selectors can only respond with true/false when called.
-->
<map:selectors default="browser">
<map:selector name="load" src="class:///org.apache.cocoon.selection.MachineLoadSelector">
...
</map:selector>
<map:selector name="user" src="class:///org.apache.cocoon.selection.AuthenticationSelector">
...
</map:selector>
<map:selector name="ip-filter" src="class:///org.apache.cocoon.selection.IPFilterSelector">
...
</map:selector>
<map:selector name="browser" factory="org.apache.cocoon.selection.BrowserSelectorFactory">
...
</map:selector>
</map:selectors>
<!--
Matchers are classes that are able to test if the request parameters
match the given pattern and, if this is the case, they are able to
return a Map of tokens that resulted from the matching or any
depending on the matcher own logic (this is up to the matcher implementation).
-->
<map:matchers default="uri-wildcard">
<map:matcher name="uri-wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher">
...
</map:matcher>
<map:matcher name="uri-regexp" factory="org.apache.cocoon.matching.RegexpURIMatcherFactory">
...
</map:matcher>
<map:matcher name="browser" src="org.apache.cocoon.matching.BrowserMatcher">
<foo value="bar">baz</foo>
<lines>
<left>red</left>
<right>white</right>
</lines>
</map:matcher>
</map:matchers>
<!--
Action are classes that are able to modify the underlying application model and
are meant as extensions to the sitemap functionality. They get access to the
objectModel containing all objects that make up a request. An Action can return
a Map of tokens that resulted from the processing logic (this is up to the action
implementation). An Action is references in the pipeline section with the type
attribute as it is with all the other sitemap components.
-->
<map:actions>
<map:action name="session-validator" src="org.apache.cocoon.acting.SessionValidationAction">
...
</map:action>
<map:action name="db-adder" src="org.apache.cocoon.acting.DBAddingAction">
<db-connection>postgresql-connection</db-connection>
</map:action>
<map:action name="db-modifier" src="org.apache.cocoon.acting.DBModifyingAction"/>
<db-connection>postgresql-connection</db-connection>
</map:action>
<map:action name="db-delete" src="org.apache.cocoon.acting.DBDeletingAction"/>
<db-connection>postgresql-connection</db-connection>
</map:action>
<map:action name="form-dispatcher" src="org.apache.cocoon.acting.FormDispatcherAction"/>
<layout-description>somewhere/layout-employee-app</layout-description>
</map:action>
</map:actions>
</map:components>
<!-- =========================== Views =================================== -->
<!--
the <view> element introduces the notion of multi-dimensional resource
views which are an extension to the HTTP paradigm of web resources. Views
do not increase sitemap functionality, but allow substantial verbosity
reduction and should help users in the creation of complex sitemaps that
are able to produce different views of the resource they handle for each
"aspect" requested.
Views can be pictured as generator-less pipelines which use, as a generator,
the result of another pipeline from the "label" they indicate or from the
position (first/last) in the pipeline.
Labels can be seen as non-standard exit points from the normal pipelines
and "first" identifies the position right after the generator while "last
indentifies the position right before the serializer.
Both generators and transformers are allowed to attach a default label to
them. If no <label> element is explicitly indicated, the sitemap handler
will scan for default labels attached to the components, starting from the
serializer and going backward, until it finds a component to start.
If none is found, the generator is assumed to be the view generator.
-->
<map:views>
<map:view name="content" from-position="first">
<map:serialize type="xml"/>
</map:view>
<map:view name="schema" from-label="content">
<map:transform type="schema"/>
<map:serialize type="xml"/>
</map:view>
<map:view name="semantics" from-label="content">
<map:transform type="rdf"/>
<map:serialize type="xml"/>
</map:view>
<map:view name="hyperlinks" from-position="last">
<map:transform src="./stylesheets/xlink-filter.xsl"/>
<map:serialize type="xml"/>
</map:view>
</map:views>
<!-- =========================== Resources ================================= -->
<!--
the <resource> element is used as a placeholder for pipelines
that are used several times inside the document. This element
is redundant and its functionality is not directly related
to the sitemap, but could be cloned by the use of internal
XInclude, for example
<xinclude:include href="#xpointer(resource[@name='Access refused'])"/>
but given the usability constraints and very specific operation
it is much easier to include such an element instead of forcing
the use of xinclude/xpointer.
-->
<map:resources>
<map:resource name="Access refused">
<map:generate src="./error-pages/restricted.xml"/>
<map:transform src="./stylesheets/general-browser.xsl"/>
<map:serialize status-code="401"/>
</map:resource>
</map:resources>
<!-- ========================== Action Sets ================================ -->
<!--
the <action-set> element is used as a collection of related actions
that are used either several times inside the pipelines or in conjuction
with form actions which are selected by the sitemap for processing.
These action-sets are referenced in the pipeline section by using a
set attribute instead of a type attribute.
All the tokens returned by the individual actions in a action-set are
collected by the sitemap engine into one big map which can be used as
replacements in src attributes from generators/transformers.
-->
<map:action-sets>
<!--
The following action-set defines:
a) a "session-validator" action which will be executed whenever this
action-set is referenced in a pipeline.
b) several "db-*" action which have a additional action attribute which the
sitemap engine uses as a value to compare against the action value supplied
from the Environment object. Every action with a matching action value will
be processed.
c) a "form-dispatcher" action which will tell the sitemap which is the
next resource to display (usually used for the generator in charge).
-->
<map:action-set name="employee-form">
<map:act type="session-validator"/>
<map:act type="db-adder" action="Add"/>
<map:act type="db-modifier" action="Update"/>
<map:act type="db-deleter" action="Delete"/>
<map:act type="form-dispatcher"/>
</map:action-set>
</map:action-sets>
<!-- =========================== Pipelines ================================= -->
<map:pipelines>
<map:pipeline>
<!--
Mount points allow sitemaps to be cascaded and site management
workload to be parallelized.
-->
<map:match pattern="cocoon/*">
<map:mount uri-prefix="cocoon/{1}" check-reload="yes"
src="cvs:pserver:anonymous@xml.apache.org://home/cvs/cocoon/xdocs/{1}"/>
</map:match>
<map:match pattern="bugs/*">
<map:mount uri-prefix="bugs/{1}" check-reload="true"
src="jar://apps/bugs.cocoon#{1}"/>
</map:match>
<map:match pattern="dist/*">
<map:mount uri-prefix="dist/{1}" check-reload="false" src="./dist/{1}"/>
</map:match>
<map:match pattern="faq/*">
<map:mount uri-prefix="faq/{1}" check-reload="no"
src="jar://apps/faq-o-matic.cocoon#{1}"/>
</map:match>
<map:match type="uri-regexp" pattern="^/xerces-(j|c|p)/(.*)$">
<map:mount uri-prefix="/xerces-{1}/{2}"
src="cvs:pserver:anonymous@xml.apache.org://home/cvs/xerces-{1}/xdocs/{2}"/>
</map:match>
<map:handle-errors>
<map:serialize type="html"/>
</map:handle-errors>
</map:pipeline>
<map:pipeline>
<!--
Matchers declarative dispatch the requests to the pipelines that
match some of their parameters
-->
<map:match pattern="cocoon/dist/*">
<map:select type="ip-filter">
<map:when test="allowsAddress()">
<!--
the <redirect-to> element is used to redirect one requested URI
to another. This is somewhat equivalent to URI rewriting.
-->
<map:redirect-to uri="dist/cocoon/{1}"/>
</map:when>
<map:otherwise>
<map:redirect-to resource="Access refused"/>
</map:otherwise>
</map:select>
</map:match>
<!--
When no "type" attribute is present, the sitemap intepreter will use the
default one, this allows a very compact and user friendly syntax as the
one below
-->
<map:match pattern="printer-friendly/*">
<map:generate src="{1}.xml"/>
<map:transform src="./stylesheet/printer-friendly.xsl"/>
<map:serialize/>
</map:match>
<map:match pattern="images/logo">
<map:select>
<map:when test="accepts('image/svg')">
<!--
the <map:read> element is used to read the src directly without
applying any processing. This is mostly useful when clients
are capable of handling XML content directly.
-->
<map:read src="./images/logo.svg"/>
</map:when>
<map:otherwise>
<map:generate src="./images/logo.svg"/>
<map:select>
<map:when test="accepts('image/png')">
<map:serialize type="svg2png"/>
</map:when>
<map:otherwise>
<map:serialize type="svg2jpg"/>
</map:otherwise>
</map:select>
</map:otherwise>
</map:select>
</map:match>
<map:match pattern="restricted/*">
<map:select type="user">
<map:when test="is('administrator')">
<map:generate src="./restricted/{1}"/>
<map:transform src="./stylesheets/restricted.xsl"/>
<map:serialize/>
</map:when>
<map:otherwise>
<map:redirect-to resource="Access refused"/>
</map:otherwise>
</map:select>
</map:match>
<!--
Example to show the notion of pipeline labels for view generation.
-->
<map:match pattern="labelled/*">
<map:label name="links">
<map:label name="content">
<map:generate src="./slides/{1}"/>
</map:label>
<map:transform src="./filters/add-navigation-links.xsl"/>
</map:label>
<map:transform src="./stylesheet/slides2html.xsl"/>
<map:serialize/>
</map:match>
<!--
Complex example to show how some xpath-like syntax is used to get access
to the pattern tokens generated by the matchers.
-->
<map:match pattern="nested-matchers/*">
<map:match type="browser" pattern="name('Mozilla ?\\?*')">
<map:mount uri-prefix="nested-matchers/{1}"
src="file:///home/www/mozilla-{1}-{2}/{../1}"/>
</map:match>
</map:match>
<map:match type="uri-regexp" pattern="([0-9]{4})/([0-9]{2})/([0-9]{2})/">
<!--
Here we implement the ability to indicate semantic information
on the processed URI. This is mostly used to avoid to encode
URI specific information in the XSP since the sitemap maintainer
is the only one responsible to manage the URI space. This removes
a URI contract between the XSP writer and the URI space manager,
moving it to parameter names which normally change less frequently.
-->
<map:param name="year" value="{1}"/>
<map:param name="month" value="{2}"/>
<map:param name="day" value="{3}"/>
<map:generate type="serverpages" src="./dailynews.xsp"/>
<map:transform src="./stylesheet/{1}/news.xsl"/>
<map:serialize/>
</map:match>
<!--
Here we show the use of action-sets. The scenario used is a form
generated which enables the visitor to add, modify and delete entries
in an employee database
-->
<map:match pattern="form/employee">
<map:act set="employee-form">
<map:generate src="forms/{next-form}.xml"/>
<map:transform src="forms2html.xsl"/>
<map:serialize/>
</map:act>
</map:match>
<map:match pattern="*">
<map:generate src="{1}.xml"/>
<map:select type="load">
<map:when test="greaterThen('2.5')">
<map:transform src="./stylesheet/low-graphics.xsl"/>
</map:when>
<map:otherwise>
<map:select>
<map:when test="is('Mozilla5')">
<map:transform src="./stylesheet/xul-enabled.xsl"/>
</map:when>
<map:otherwise>
<map:transform src="./stylesheet/general-browser.xsl"/>
</map:otherwise>
</map:select>
</map:otherwise>
</map:select>
<map:serialize/>
</map:match>
<map:handle-errors>
<map:select>
<map:when test="accepts('text/vnd.wap.wml')">
<map:transform src="./styles/Pipeline2WML.xsl"/>
<map:serialize type="wap"/>
</map:when>
<map:otherwise>
<map:transform src="./styles/Pipeline2HTML.xsl"/>
<map:serialize/>
</map:otherwise>
</map:select>
</map:handle-errors>
</map:pipeline>
</map:pipelines>
</map:sitemap>
<!-- end of file -->
1.1 xml-cocoon2/documentation/xdocs/drafts/sitemap-working-draft.xsd
Index: sitemap-working-draft.xsd
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!-- =============== Cocoon Sitemap Working Draft ============================
Copyright (C) 2000 The Apache Software Foundation. All rights reserved.
Redistribution of this document is permitted provided that the following
conditions are met:
1. Redistributions must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. This document is referred to and considered only as "working draft".
3. Any software implementation inspired by this document must indicate
in its documentation:
"inspired by research and development on behalf of the
Apache Software Foundation"
4. The names "Cocoon" and "Apache Software Foundation" must not be used to
endorse or promote products inspired from this document without prior
written permission. For written permission, please contact
apache@apache.org.
5. Products derived from this document may not be called "Cocoon", nor may
"Cocoon" nor "Apache" appear in their name, without prior written
permission of the Apache Software Foundation.
THIS DOCUMENT IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This document consists of voluntary contributions made by many individuals
on behalf of the Apache Software Foundation. For more information on the
Apache Software Foundation, please see <http://www.apache.org/>.
==============================================================================
This document contains an example used as a working draft for
Cocoon architects to test and understand the issues associated with
sitemaps and XML publishing in general. It must be considered as a working
draft and may be updated at any time.
============================================================================ -->
<schema xmlns="http://www.w3.org/1999/XMLSchema"
xmlns:map="http://apache.org/cocoon/sitemap/1.0"
targetNamespace="http://apache.org/cocoon/sitemap/1.0">
<complexType name="groupType">
<!--
Is it possible to have the type be an enumeration of the
values of the children's type attribute?
-->
<attribute name="default" type="string" use="required"/>
</complexType>
<complexType name="componentType" base="string">
<!-- Anything goes for parameter values... -->
<any minOccurs="0" maxOccurs="unbounded"/>
<attribute name="type" type="string" use="required"/>
<attribute name="src" type="uriReference" use="required"/>
<attribute name="label" type="string"/>
</complexType>
<complexType name="actionType">
<attribute name="type" type="string" use="optional"/>
<attribute name="src" type="uriReference" use="optional"/>
</complexType>
<complexType name="generateType">
<element name="generate" minOccurs="1" maxOccurs="1" type="map:actionType"/>
</complexType>
<complexType name="actionTypes">
<sequence>
<element name="generate" minOccurs="1" maxOccurs="1" type="map:actionType"/>
<element name="transform" minOccurs="0" maxOccurs="unbounded" type="map:actionType"/>
<element name="serialize" minOccurs="1" maxOccurs="1">
<complexType base="map:actionType">
<attribute name="status-code" type="short"/>
</complexType>
</element>
</sequence>
</complexType>
<complexType name="matchType">
<attribute name="type" type="string" use="optional"/>
<attribute name="pattern" type="string" use="required"/>
</complexType>
<element name="sitemap" minOccurs="1" maxOccurs="1">
<complexType>
<element name="components" minOccurs="1" maxOccurs="1">
<complexType>
<element name="generators" minOccurs="1" maxOccurs="1">
<complexType base="map:groupType">
<element name="generator" minOccurs="1" maxOccurs="unbounded" type="map:componentType"/>
</complexType>
</element>
<element name="transformers" minOccurs="0" maxOccurs="1">
<complexType base="map:groupType">
<element name="transformer" minOccurs="1" maxOccurs="unbounded" type="map:componentType"/>
</complexType>
</element>
<element name="serializers" minOccurs="1" maxOccurs="1">
<complexType base="map:groupType">
<element name="serializer" minOccurs="1" maxOccurs="unbounded">
<complexType base="map:componentType">
<attribute name="mime-type" type="string"/>
</complexType>
</element>
</complexType>
</element>
<element name="choosers" minOccurs="0" maxOccurs="1">
<complexType base="map:groupType">
<element name="chooser" minOccurs="1" maxOccurs="unbounded" type="map:componentType"/>
</complexType>
</element>
<element name="matchers" minOccurs="0" maxOccurs="1">
<complexType base="map:groupType">
<element name="matcher" minOccurs="1" maxOccurs="unbounded" type="map:componentType"/>
</complexType>
</element>
</complexType>
</element>
<!-- end components -->
<element name="views" minOccurs="0" maxOccurs="1">
<complexType>
<element name="view" minOccurs="1" maxOccurs="unbounded">
<complexType>
<element name="transform" minOccurs="0" maxOccurs="unbounded" type="map:actionType"/>
<element name="serialize" minOccurs="1" maxOccurs="1" type="map:actionType"/>
<attribute name="name" type="string" use="required"/>
<attribute name="generate-from" type="string" use="required"/>
</complexType>
</element>
</complexType>
</element>
<element name="resources" minOccurs="0" maxOccurs="1">
<complexType>
<element name="resource" minOccurs="1" maxOccurs="unbounded">
<complexType base="map:actionTypes">
<attribute name="name" type="string" use="required"/>
</complexType>
</element>
</complexType>
</element>
<element name="pipelines" minOccurs="0" maxOccurs="1">
<complexType>
<element name="pipeline" minOccurs="1" maxOccurs="unbounded">
<complexType>
<element name="match" minOccurs="1" maxOccurs="unbounded">
<complexType base="map:matchType"/>
</element>
</complexType>
</element>
</complexType>
</element>
</complexType>
</element>
</schema>
----------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org