You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2005/10/05 11:20:52 UTC
svn commit: r295024 - in /cocoon/branches/BRANCH_2_1_X: ./
src/java/org/apache/cocoon/components/source/impl/ src/webapp/WEB-INF/
src/webapp/samples/sources/
Author: vgritsenko
Date: Wed Oct 5 02:20:29 2005
New Revision: 295024
URL: http://svn.apache.org/viewcvs?rev=295024&view=rev
Log:
Moved support for zip: sources from scratchpad into the core.
Added:
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/source/impl/ZipSource.java
- copied unchanged from r294870, cocoon/blocks/scratchpad/trunk/java/org/apache/cocoon/components/source/impl/ZipSource.java
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/source/impl/ZipSourceFactory.java
- copied unchanged from r294870, cocoon/blocks/scratchpad/trunk/java/org/apache/cocoon/components/source/impl/ZipSourceFactory.java
cocoon/branches/BRANCH_2_1_X/src/webapp/samples/sources/test.sxw
- copied unchanged from r294870, cocoon/blocks/scratchpad/trunk/samples/sources/test.sxw
cocoon/branches/BRANCH_2_1_X/src/webapp/samples/sources/test.zip
- copied unchanged from r294870, cocoon/blocks/scratchpad/trunk/samples/sources/test.zip
Modified:
cocoon/branches/BRANCH_2_1_X/src/webapp/WEB-INF/cocoon.xconf
cocoon/branches/BRANCH_2_1_X/src/webapp/samples/sources/samples.xml
cocoon/branches/BRANCH_2_1_X/src/webapp/samples/sources/sitemap.xmap
cocoon/branches/BRANCH_2_1_X/status.xml
Modified: cocoon/branches/BRANCH_2_1_X/src/webapp/WEB-INF/cocoon.xconf
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/webapp/WEB-INF/cocoon.xconf?rev=295024&r1=295023&r2=295024&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/webapp/WEB-INF/cocoon.xconf (original)
+++ cocoon/branches/BRANCH_2_1_X/src/webapp/WEB-INF/cocoon.xconf Wed Oct 5 02:20:29 2005
@@ -544,6 +544,7 @@
<component-instance name="upload" class="org.apache.cocoon.components.source.impl.PartSourceFactory"/>
<component-instance name="module" class="org.apache.cocoon.components.source.impl.ModuleSourceFactory"/>
<component-instance name="xmodule" class="org.apache.cocoon.components.source.impl.XModuleSourceFactory"/>
+ <component-instance name="zip" class="org.apache.cocoon.components.source.impl.ZipSourceFactory"/>
<component-instance name="empty" class="org.apache.cocoon.components.source.impl.EmptySourceFactory"/>
<!--+
Modified: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/sources/samples.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/webapp/samples/sources/samples.xml?rev=295024&r1=295023&r2=295024&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/webapp/samples/sources/samples.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/src/webapp/samples/sources/samples.xml Wed Oct 5 02:20:29 2005
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
- Copyright 1999-2004 The Apache Software Foundation
+ Copyright 1999-2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,83 +15,94 @@
limitations under the License.
-->
-<!-- CVS $Id: samples.xml,v 1.6 2004/05/18 10:31:56 unico Exp $ -->
-
-<samples name="Using Sources" xmlns:xlink="http://www.w3.org/1999/xlink">
+<!--+
+ | $Id$
+ +-->
+<samples name="Using Sources">
<group name="Back">
- <sample name="Back" href="../">
- Back to the samples home page.
- </sample>
+ <sample name="Back" href="../">
+ Back to the samples home page.
+ </sample>
</group>
<group name="Note">
- <note>
- Some of these samples require XSP to be present in order to work.
- </note>
+ <note>
+ Some of these samples require XSP to be present in order to work.
+ </note>
</group>
-
+
<group name="Static XML With Static XSL">
- <sample name="All Static" href="all-static">
- This is the simpliest sample, similar to the "Hello World!".
- </sample>
+ <sample name="All Static" href="all-static">
+ This is the simpliest sample, similar to the "Hello World!".
+ </sample>
</group>
<group name="Obtaining XSP Source">
- <sample name="Plain XSP" href="xsp/file">
- Source is obtained from local file
- </sample>
-
- <sample name="This sitemap XSP" href="xsp/cocoon">
- Source is obtained via cocoon:/source
- </sample>
-
- <sample name="Root sitemap XSP" href="xsp/cocoon-root">
- Source is obtained via cocoon://sub/source
- </sample>
-
- <sample name="External XSP" href="xsp/http">
- Source is obtained via http://<serverName>[:<serverPort>][/<contextPath>]/samples/sources/xsp/source
- </sample>
-
- <sample name="Dynamic XSP" href="xsp/dynamic">
- Source is generated dynamically and obtained as Cocoon source cocoon:/dynamic-source
- </sample>
+ <sample name="Plain XSP" href="xsp/file">
+ Source is obtained from local file
+ </sample>
+
+ <sample name="This sitemap XSP" href="xsp/cocoon">
+ Source is obtained via cocoon:/source
+ </sample>
+
+ <sample name="Root sitemap XSP" href="xsp/cocoon-root">
+ Source is obtained via cocoon://sub/source
+ </sample>
+
+ <sample name="External XSP" href="xsp/http">
+ Source is obtained via http://<serverName>[:<serverPort>][/<contextPath>]/samples/sources/xsp/source
+ </sample>
+
+ <sample name="Dynamic XSP" href="xsp/dynamic">
+ Source is generated dynamically and obtained as Cocoon source cocoon:/dynamic-source
+ </sample>
</group>
<group name="Obtaining XSL Source">
- <sample name="Plain XSL" href="xsl-file">
- XSL is obtained from local file
- </sample>
-
- <sample name="This sitemap XSL" href="xsl-cocoon">
- XSL is obtained via cocoon:/xsl-source, processed by this sitemap directly.
- </sample>
-
- <sample name="Root sitemap XSL" href="xsl-cocoon-root">
- XSL is obtained via cocoon://sub/xsl-source, processed by root sitemap.
- </sample>
-
- <sample name="External XSL" href="xsl-http">
- XSL is obtained via http://<serverName>[:<serverPort>][/<contextPath>]/samples/sources/xsl-source
- </sample>
-
- <sample name="Dynamic XSL" href="xsl-dynamic">
- XSL is dynamically generated and obtained as Cocoon source cocoon:/xsl-dynamic-source.
- </sample>
+ <sample name="Plain XSL" href="xsl-file">
+ XSL is obtained from local file
+ </sample>
+
+ <sample name="This sitemap XSL" href="xsl-cocoon">
+ XSL is obtained via cocoon:/xsl-source, processed by this sitemap directly.
+ </sample>
+
+ <sample name="Root sitemap XSL" href="xsl-cocoon-root">
+ XSL is obtained via cocoon://sub/xsl-source, processed by root sitemap.
+ </sample>
+
+ <sample name="External XSL" href="xsl-http">
+ XSL is obtained via http://<serverName>[:<serverPort>][/<contextPath>]/samples/sources/xsl-source
+ </sample>
+
+ <sample name="Dynamic XSL" href="xsl-dynamic">
+ XSL is dynamically generated and obtained as Cocoon source cocoon:/xsl-dynamic-source.
+ </sample>
</group>
<group name="Dynamic XSP With Dynamic XSL">
- <sample name="All Dynamic" href="xsp/all-dynamic">
- Combines last XSP sample with last XSL sample: XSP is obtained via Cocoon
- source cocoon:/dynamic-source, and processed by XSL obtained via Cocoon
- source cocoon:/xsl-dynamic-source.
- </sample>
+ <sample name="All Dynamic" href="xsp/all-dynamic">
+ Combines last XSP sample with last XSL sample: XSP is obtained via Cocoon
+ source cocoon:/dynamic-source, and processed by XSL obtained via Cocoon
+ source cocoon:/xsl-dynamic-source.
+ </sample>
</group>
-
+
<group name="Uploaded XML through Static XSL">
- <sample name="Uploaded XML" href="xml-upload">
- Demonstrates use of upload:// pseudo-protocol.
- </sample>
+ <sample name="Uploaded XML" href="xml-upload">
+ Demonstrates use of upload:// pseudo-protocol.
+ </sample>
</group>
+
+ <group name="ZIP Source">
+ <sample name="Simple ZIP source example" href="zip/test.xml">
+ Read test.xml file from test.zip ZIP archive
+ </sample>
+ <sample name="OpenOffice - content.xml" href="zip/content.xml">
+ Read content.xml file out of test.sxw OpenOffice document.
+ </sample>
+ </group>
+
</samples>
Modified: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/sources/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/webapp/samples/sources/sitemap.xmap?rev=295024&r1=295023&r2=295024&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/webapp/samples/sources/sitemap.xmap (original)
+++ cocoon/branches/BRANCH_2_1_X/src/webapp/samples/sources/sitemap.xmap Wed Oct 5 02:20:29 2005
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
- Copyright 1999-2004 The Apache Software Foundation
+ Copyright 1999-2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,150 +15,163 @@
limitations under the License.
-->
+<!--+
+ | $Id$
+ +-->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
- <map:views>
- <map:view name="content" from-label="content">
- <map:serialize type="xml"/>
- </map:view>
- <map:view from-label="content" name="pretty-content">
- <map:transform src="context://stylesheets/system/xml2html.xslt"/>
- <map:serialize type="html"/>
- </map:view>
- <map:view name="links" from-position="last">
- <map:serialize type="links"/>
- </map:view>
- </map:views>
-
- <map:pipelines>
- <map:pipeline>
-
- <map:match pattern="">
- <map:redirect-to uri="welcome"/>
- </map:match>
-
- <map:match pattern="welcome">
- <map:generate src="samples.xml"/>
- <map:transform src="context://samples/common/style/xsl/html/simple-samples2html.xsl">
- <map:parameter name="contextPath" value="{request:contextPath}"/>
- </map:transform>
- <map:serialize/>
- </map:match>
-
- <!-- All Static. -->
- <map:match pattern="all-static">
- <map:generate src="content/simple.xml"/>
- <map:transform src="context://samples/common/style/xsl/html/simple-page2html.xsl">
- <map:parameter name="servletPath" value="{request:servletPath}"/>
- <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
- <map:parameter name="contextPath" value="{request:contextPath}"/>
- <map:parameter name="remove" value="all-static"/>
- <map:parameter name="file" value="content/simple.xml"/>
- </map:transform>
- <map:serialize/>
- </map:match>
-
- <map:match pattern="xsp/**">
- <map:mount uri-prefix="xsp" src="xsp.xmap" />
- </map:match>
-
- <!-- These samples show ways how XSL could be obtained and applied -->
- <map:match pattern="xsl-*">
-
- <!-- XSL obtained from the local file, and applied -->
- <map:match pattern="xsl-file">
- <map:generate src="content/simple.xml"/>
- <map:transform src="context://samples/common/style/xsl/html/simple-page2html.xsl">
- <map:parameter name="servletPath" value="{request:servletPath}"/>
- <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
- <map:parameter name="contextPath" value="{request:contextPath}"/>
- <map:parameter name="remove" value="{0}"/>
- <map:parameter name="file" value="content/simple.xml"/>
- </map:transform>
- <map:serialize/>
- </map:match>
-
- <!-- Generate XSL source from local file -->
- <map:match pattern="xsl-source">
- <map:generate src="context://samples/common/style/xsl/html/simple-page2html.xsl"/>
- <map:serialize type="xml"/>
- </map:match>
-
- <!-- XSL obtained from the matcher 'xsl-source', right above, and applied -->
- <map:match pattern="xsl-cocoon">
- <map:generate src="content/simple.xml"/>
- <map:transform src="cocoon:/xsl-source">
- <map:parameter name="servletPath" value="{request:servletPath}"/>
- <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
- <map:parameter name="contextPath" value="{request:contextPath}"/>
- <map:parameter name="remove" value="{0}"/>
- <map:parameter name="file" value="content/simple.xml"/>
- </map:transform>
- <map:serialize/>
- </map:match>
-
- <!-- XSL obtained from the matcher 'xsl-source', absolute reference, and applied -->
- <map:match pattern="xsl-cocoon-root">
- <map:generate src="content/simple.xml"/>
- <map:transform src="cocoon://samples/sources/xsl-source">
- <map:parameter name="servletPath" value="{request:servletPath}"/>
- <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
- <map:parameter name="contextPath" value="{request:contextPath}"/>
- <map:parameter name="remove" value="{0}"/>
- <map:parameter name="file" value="content/simple.xml"/>
- </map:transform>
- <map:serialize/>
- </map:match>
-
- <!-- XSL obtained from the external HTTP server, and applied -->
- <map:match pattern="xsl-http">
- <map:generate src="content/simple.xml"/>
- <map:transform src="http://{request:serverName}:{request:serverPort}/{request:contextPath}/samples/sources/xsl-source">
- <map:parameter name="servletPath" value="{request:servletPath}"/>
- <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
- <map:parameter name="contextPath" value="{request:contextPath}"/>
- <map:parameter name="remove" value="{0}"/>
- <map:parameter name="file" value="content/simple.xml"/>
- </map:transform>
- <map:serialize/>
- </map:match>
-
- <!-- XSL obtained from the matcher 'xsl-dynamic-source'. Beware: Slow! -->
- <map:match pattern="xsl-dynamic">
- <map:generate src="content/simple.xml"/>
- <map:transform src="cocoon:/xsp/xsl-dynamic-source">
- <map:parameter name="servletPath" value="{request:servletPath}"/>
- <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
- <map:parameter name="contextPath" value="{request:contextPath}"/>
- <map:parameter name="remove" value="{0}"/>
- <map:parameter name="file" value="content/simple.xml"/>
- </map:transform>
- <map:serialize/>
- </map:match>
- </map:match>
-
-
- <!-- Uploaded xml as source. Beware: Very cool! -->
- <map:match pattern="xml-upload">
- <map:generate src="content/upload.xml"/>
- <map:transform src="context://samples/common/style/xsl/html/simple-page2html.xsl">
- <map:parameter name="servletPath" value="{request:servletPath}"/>
- <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
- <map:parameter name="contextPath" value="{request:contextPath}"/>
- <map:parameter name="remove" value="xml-upload"/>
- <map:parameter name="file" value="content/simple.xml"/>
- </map:transform>
- <map:serialize/>
- </map:match>
- <map:match pattern="xml-upload-post">
- <map:generate src="upload://formFieldOne"/>
- <map:transform src="context://stylesheets/system/xml2html.xslt"/>
- <map:serialize/>
- </map:match>
+ <map:views>
+ <map:view name="content" from-label="content">
+ <map:serialize type="xml"/>
+ </map:view>
+ <map:view from-label="content" name="pretty-content">
+ <map:transform src="context://stylesheets/system/xml2html.xslt"/>
+ <map:serialize type="html"/>
+ </map:view>
+ <map:view name="links" from-position="last">
+ <map:serialize type="links"/>
+ </map:view>
+ </map:views>
+
+ <map:pipelines>
+ <map:pipeline>
+ <map:match pattern="">
+ <map:redirect-to uri="welcome"/>
+ </map:match>
+
+ <map:match pattern="welcome">
+ <map:generate src="samples.xml"/>
+ <map:transform src="context://samples/common/style/xsl/html/simple-samples2html.xsl">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ <map:serialize/>
+ </map:match>
+
+ <!-- All Static. -->
+ <map:match pattern="all-static">
+ <map:generate src="content/simple.xml"/>
+ <map:transform src="context://samples/common/style/xsl/html/simple-page2html.xsl">
+ <map:parameter name="servletPath" value="{request:servletPath}"/>
+ <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ <map:parameter name="remove" value="all-static"/>
+ <map:parameter name="file" value="content/simple.xml"/>
+ </map:transform>
+ <map:serialize/>
+ </map:match>
+
+ <map:match pattern="xsp/**">
+ <map:mount uri-prefix="xsp" src="xsp.xmap" />
+ </map:match>
+
+ <!-- These samples show ways how XSL could be obtained and applied -->
+ <map:match pattern="xsl-*">
+
+ <!-- XSL obtained from the local file, and applied -->
+ <map:match pattern="xsl-file">
+ <map:generate src="content/simple.xml"/>
+ <map:transform src="context://samples/common/style/xsl/html/simple-page2html.xsl">
+ <map:parameter name="servletPath" value="{request:servletPath}"/>
+ <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ <map:parameter name="remove" value="{0}"/>
+ <map:parameter name="file" value="content/simple.xml"/>
+ </map:transform>
+ <map:serialize/>
+ </map:match>
+
+ <!-- Generate XSL source from local file -->
+ <map:match pattern="xsl-source">
+ <map:generate src="context://samples/common/style/xsl/html/simple-page2html.xsl"/>
+ <map:serialize type="xml"/>
+ </map:match>
+
+ <!-- XSL obtained from the matcher 'xsl-source', right above, and applied -->
+ <map:match pattern="xsl-cocoon">
+ <map:generate src="content/simple.xml"/>
+ <map:transform src="cocoon:/xsl-source">
+ <map:parameter name="servletPath" value="{request:servletPath}"/>
+ <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ <map:parameter name="remove" value="{0}"/>
+ <map:parameter name="file" value="content/simple.xml"/>
+ </map:transform>
+ <map:serialize/>
+ </map:match>
+
+ <!-- XSL obtained from the matcher 'xsl-source', absolute reference, and applied -->
+ <map:match pattern="xsl-cocoon-root">
+ <map:generate src="content/simple.xml"/>
+ <map:transform src="cocoon://samples/sources/xsl-source">
+ <map:parameter name="servletPath" value="{request:servletPath}"/>
+ <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ <map:parameter name="remove" value="{0}"/>
+ <map:parameter name="file" value="content/simple.xml"/>
+ </map:transform>
+ <map:serialize/>
+ </map:match>
+
+ <!-- XSL obtained from the external HTTP server, and applied -->
+ <map:match pattern="xsl-http">
+ <map:generate src="content/simple.xml"/>
+ <map:transform src="http://{request:serverName}:{request:serverPort}/{request:contextPath}/samples/sources/xsl-source">
+ <map:parameter name="servletPath" value="{request:servletPath}"/>
+ <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ <map:parameter name="remove" value="{0}"/>
+ <map:parameter name="file" value="content/simple.xml"/>
+ </map:transform>
+ <map:serialize/>
+ </map:match>
+
+ <!-- XSL obtained from the matcher 'xsl-dynamic-source'. Beware: Slow! -->
+ <map:match pattern="xsl-dynamic">
+ <map:generate src="content/simple.xml"/>
+ <map:transform src="cocoon:/xsp/xsl-dynamic-source">
+ <map:parameter name="servletPath" value="{request:servletPath}"/>
+ <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ <map:parameter name="remove" value="{0}"/>
+ <map:parameter name="file" value="content/simple.xml"/>
+ </map:transform>
+ <map:serialize/>
+ </map:match>
+ </map:match>
+
+
+ <!-- Uploaded xml as source. Beware: Very cool! -->
+ <map:match pattern="xml-upload">
+ <map:generate src="content/upload.xml"/>
+ <map:transform src="context://samples/common/style/xsl/html/simple-page2html.xsl">
+ <map:parameter name="servletPath" value="{request:servletPath}"/>
+ <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ <map:parameter name="remove" value="xml-upload"/>
+ <map:parameter name="file" value="content/simple.xml"/>
+ </map:transform>
+ <map:serialize/>
+ </map:match>
+
+ <map:match pattern="xml-upload-post">
+ <map:generate src="upload://formFieldOne"/>
+ <map:transform src="context://stylesheets/system/xml2html.xslt"/>
+ <map:serialize/>
+ </map:match>
+
+
+ <!-- Zip file entry as a source. -->
+ <map:match pattern="zip/test.xml">
+ <map:generate src="zip:test.zip!/test.xml"/>
+ <map:serialize type="xml"/>
+ </map:match>
+
+ <map:match pattern="zip/content.xml">
+ <map:generate src="zip:test.sxw!/content.xml"/>
+ <map:serialize type="xml"/>
+ </map:match>
- </map:pipeline>
- </map:pipelines>
+ </map:pipeline>
+ </map:pipelines>
</map:sitemap>
-
-<!-- end of file -->
Modified: cocoon/branches/BRANCH_2_1_X/status.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/status.xml?rev=295024&r1=295023&r2=295024&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/status.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/status.xml Wed Oct 5 02:20:29 2005
@@ -197,10 +197,13 @@
<changes>
<release version="@version@" date="@date@">
+ <action dev="VG" type="add">
+ Moved support for zip: sources from scratchpad into the core.
+ </action>
<action dev="SW" type="add" due-to="Jean-Chrisophe Kermagoret" due-to-email="jck@bluexml.org">
- CForms: Small change to the calendar styling which now shows dropdowns to choose the time when
- the date format includes time also.
- </action>
+ CForms: Small change to the calendar styling which now shows dropdowns
+ to choose the time when the date format includes time also.
+ </action>
<action dev="AG" type="update">
Updated quartz to 1.5.0.
</action>