cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r170045 - in /cocoon/trunk: ./ src/java/org/apache/cocoon/transformation/ src/webapp/ src/webapp/samples/aggregation/ src/webapp/samples/aggregation/content/
Date Fri, 13 May 2005 15:45:49 GMT
Author: vgritsenko
Date: Fri May 13 08:45:48 2005
New Revision: 170045

URL: http://svn.apache.org/viewcvs?rev=170045&view=rev
Log:
move include transformer into the code.
add include transformer samples.
add xinclude transformer aggregation sample.

Added:
    cocoon/trunk/src/java/org/apache/cocoon/transformation/IncludeTransformer.java
      - copied unchanged from r170036, cocoon/blocks/unsupported/scratchpad/trunk/java/org/apache/cocoon/transformation/IncludeTransformer.java
    cocoon/trunk/src/webapp/samples/aggregation/content/itest.xml   (with props)
    cocoon/trunk/src/webapp/samples/aggregation/content/itest2.xml   (with props)
    cocoon/trunk/src/webapp/samples/aggregation/content/itest3.xml   (with props)
    cocoon/trunk/src/webapp/samples/aggregation/content/itest4.xml   (with props)
    cocoon/trunk/src/webapp/samples/aggregation/content/itest5.xml   (with props)
    cocoon/trunk/src/webapp/samples/aggregation/content/sample.xhtml
      - copied, changed from r169701, cocoon/trunk/src/webapp/samples/aggregation/content/somehtml.xhtml
    cocoon/trunk/src/webapp/samples/aggregation/content/xbase.xml
      - copied unchanged from r169701, cocoon/trunk/src/webapp/samples/aggregation/content/xmlbase.xml
    cocoon/trunk/src/webapp/samples/aggregation/content/xhtml.xml
      - copied, changed from r169701, cocoon/trunk/src/webapp/samples/aggregation/content/includehtml.xml
    cocoon/trunk/src/webapp/samples/aggregation/content/xloop.xml
      - copied unchanged from r169701, cocoon/trunk/src/webapp/samples/aggregation/content/loopinclusion.xml
    cocoon/trunk/src/webapp/samples/aggregation/xaggregate.xml   (with props)
Removed:
    cocoon/trunk/src/webapp/samples/aggregation/content/includehtml.xml
    cocoon/trunk/src/webapp/samples/aggregation/content/loopinclusion.xml
    cocoon/trunk/src/webapp/samples/aggregation/content/somehtml.xhtml
    cocoon/trunk/src/webapp/samples/aggregation/content/xmlbase.xml
Modified:
    cocoon/trunk/src/webapp/samples/aggregation/aggregate.xml
    cocoon/trunk/src/webapp/samples/aggregation/content/test.xml
    cocoon/trunk/src/webapp/samples/aggregation/samples.xml
    cocoon/trunk/src/webapp/samples/aggregation/sitemap.xmap
    cocoon/trunk/src/webapp/sitemap.xmap
    cocoon/trunk/status.xml

Modified: cocoon/trunk/src/webapp/samples/aggregation/aggregate.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/webapp/samples/aggregation/aggregate.xml?rev=170045&r1=170044&r2=170045&view=diff
==============================================================================
--- cocoon/trunk/src/webapp/samples/aggregation/aggregate.xml (original)
+++ cocoon/trunk/src/webapp/samples/aggregation/aggregate.xml Fri May 13 08:45:48 2005
@@ -15,16 +15,16 @@
   limitations under the License.
 -->
 
-<!-- CVS $Id: aggregate.xml,v 1.4 2004/04/05 12:34:22 antonio Exp $ -->
+<!-- CVS $Id$ -->
 
-<page xmlns:cinclude="http://apache.org/cocoon/include/1.0">
-    <slashdot>
-        <cinclude:include src="cocoon:/slashdot"/>
-    </slashdot>
-    <moreover>
-        <cinclude:include src="cocoon:/moreover"/>
-    </moreover>
-    <xmlhack>
-        <cinclude:include src="cocoon:/xmlhack"/>
-    </xmlhack>
+<page xmlns:i="http://apache.org/cocoon/include/1.0">
+  <slashdot>
+    <i:include src="cocoon:/slashdot"/>
+  </slashdot>
+  <moreover>
+    <i:include src="cocoon:/moreover"/>
+  </moreover>
+  <xmlhack>
+    <i:include src="cocoon:/xmlhack"/>
+  </xmlhack>
 </page>

Added: cocoon/trunk/src/webapp/samples/aggregation/content/itest.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/webapp/samples/aggregation/content/itest.xml?rev=170045&view=auto
==============================================================================
--- cocoon/trunk/src/webapp/samples/aggregation/content/itest.xml (added)
+++ cocoon/trunk/src/webapp/samples/aggregation/content/itest.xml Fri May 13 08:45:48 2005
@@ -0,0 +1,132 @@
+<?xml version="1.0"?>
+
+<!--
+  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.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<page xmlns:i="http://apache.org/cocoon/include/1.0">
+  <title>Include Transformer Demo</title>
+
+  <content>
+    <!--
+      - Example 1
+      -->
+    <h3>Include XML source</h3>
+    <pre><![CDATA[<i:include src="itest3.xml"/>]]></pre>
+    <i:include src="itest3.xml"/>
+    <hr/>
+
+    <!--
+      - Example 2
+      -->
+    <h3>Recursive include</h3>
+    <pre><![CDATA[<i:include src="itest4.xml"/>]]></pre>
+    <i:include src="itest4.xml"/>
+    <hr/>
+
+    <!--
+      - Example 3
+      -->
+    <h3>Include with fallback (Ok)</h3>
+    <pre><![CDATA[
+<i:include src="itest5.xml">
+  <i:fallback>
+    <b>Oops!</b> Failed to include a file.
+  </i:fallback>
+</i:include>
+    ]]></pre>
+    <i:include src="itest5.xml">
+      <i:fallback>
+        <b>Oops!</b> Failed to include a file.
+      </i:fallback>
+    </i:include>
+    <hr/>
+
+    <!--
+      - Example 4
+      -->
+    <h3>Include with fallback (missing file)</h3>
+    <pre><![CDATA[
+<i:include src="does-not-exist.xml">
+  <i:fallback>
+    <b>Oops!</b> Failed to include a file.
+  </i:fallback>
+</i:include>
+    ]]></pre>
+    <i:include src="cocoon:does-not-exist.xml">
+      <i:fallback>
+        <b>Oops!</b> Failed to include a file.
+      </i:fallback>
+    </i:include>
+    <hr/>
+
+    <!--
+      - Example 5
+      -->
+    <h3>Include with fallback (malformed file)</h3>
+    <pre><![CDATA[
+<i:include src="itest2.xml">
+  <i:fallback>
+    <b>Oops!</b> Failed to include a file.
+  </i:fallback>
+</i:include>
+    ]]></pre>
+    <i:include src="itest2.xml">
+      <i:fallback>
+        <b>Oops!</b> Failed to include a file.
+      </i:fallback>
+    </i:include>
+    <hr/>
+
+    <!--
+      - Example 6
+      -->
+    <h3>Nested includes with fallbacks</h3>
+    <pre><![CDATA[
+<i:include src="itest2.xml">
+  <i:fallback>
+    <b>Oops!</b> Failed to include a file. Try again:
+    <i:include src="itest2.xml">
+      <i:fallback>
+        <b>Oops!</b> Failed to include a file twice!
+      </i:fallback>
+    </i:include>
+  </i:fallback>
+</i:include>
+    ]]></pre>
+    <i:include src="itest2.xml">
+      <i:fallback>
+        <b>Oops!</b> Failed to include a file. Try again:
+        <i:include src="itest2.xml">
+          <i:fallback>
+            <b>Oops!</b> Failed to include a file twice!
+          </i:fallback>
+        </i:include>
+      </i:fallback>
+    </i:include>
+    <hr/>
+
+    <!--
+      - Example 6
+      -->
+    <h3>Text include</h3>
+    <pre><![CDATA[<i:include src="itest4.xml" parse="text"/>]]></pre>
+    <pre>
+<i:include src="itest4.xml" parse="text"/>
+    </pre>
+    <hr/>
+
+  </content>
+</page>

Propchange: cocoon/trunk/src/webapp/samples/aggregation/content/itest.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/src/webapp/samples/aggregation/content/itest.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/trunk/src/webapp/samples/aggregation/content/itest2.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/webapp/samples/aggregation/content/itest2.xml?rev=170045&view=auto
==============================================================================
--- cocoon/trunk/src/webapp/samples/aggregation/content/itest2.xml (added)
+++ cocoon/trunk/src/webapp/samples/aggregation/content/itest2.xml Fri May 13 08:45:48 2005
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+
+<!--
+  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.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<para>
+  This is the content of the <b>itest2.xml</b> file.
+  It is <i> malformed.
+</para>

Propchange: cocoon/trunk/src/webapp/samples/aggregation/content/itest2.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/src/webapp/samples/aggregation/content/itest2.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/trunk/src/webapp/samples/aggregation/content/itest3.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/webapp/samples/aggregation/content/itest3.xml?rev=170045&view=auto
==============================================================================
--- cocoon/trunk/src/webapp/samples/aggregation/content/itest3.xml (added)
+++ cocoon/trunk/src/webapp/samples/aggregation/content/itest3.xml Fri May 13 08:45:48 2005
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+
+<!--
+  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.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<para>
+  This is the content of the <b>itest3.xml</b> file.
+</para>

Propchange: cocoon/trunk/src/webapp/samples/aggregation/content/itest3.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/src/webapp/samples/aggregation/content/itest3.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/trunk/src/webapp/samples/aggregation/content/itest4.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/webapp/samples/aggregation/content/itest4.xml?rev=170045&view=auto
==============================================================================
--- cocoon/trunk/src/webapp/samples/aggregation/content/itest4.xml (added)
+++ cocoon/trunk/src/webapp/samples/aggregation/content/itest4.xml Fri May 13 08:45:48 2005
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+
+<!--
+  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.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<para xmlns:i="http://apache.org/cocoon/include/1.0">
+  This is content in <b>itest4.xml</b>, will do a include of itest5.xml here:
+  <i:include src="itest5.xml"/>
+</para>

Propchange: cocoon/trunk/src/webapp/samples/aggregation/content/itest4.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/src/webapp/samples/aggregation/content/itest4.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/trunk/src/webapp/samples/aggregation/content/itest5.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/webapp/samples/aggregation/content/itest5.xml?rev=170045&view=auto
==============================================================================
--- cocoon/trunk/src/webapp/samples/aggregation/content/itest5.xml (added)
+++ cocoon/trunk/src/webapp/samples/aggregation/content/itest5.xml Fri May 13 08:45:48 2005
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+
+<!--
+  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.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<para>
+  This is the content of <b>itest5.xml</b>
+</para>

Propchange: cocoon/trunk/src/webapp/samples/aggregation/content/itest5.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/src/webapp/samples/aggregation/content/itest5.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: cocoon/trunk/src/webapp/samples/aggregation/content/sample.xhtml (from r169701, cocoon/trunk/src/webapp/samples/aggregation/content/somehtml.xhtml)
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/webapp/samples/aggregation/content/sample.xhtml?p2=cocoon/trunk/src/webapp/samples/aggregation/content/sample.xhtml&p1=cocoon/trunk/src/webapp/samples/aggregation/content/somehtml.xhtml&r1=169701&r2=170045&rev=170045&view=diff
==============================================================================
--- cocoon/trunk/src/webapp/samples/aggregation/content/somehtml.xhtml (original)
+++ cocoon/trunk/src/webapp/samples/aggregation/content/sample.xhtml Fri May 13 08:45:48 2005
@@ -19,7 +19,7 @@
     <title></title>
   </head>
   <body>
-    <p>Hello, this is the content of the <tt>somehtml.xhtml</tt> file.</p>
+    <p>Hello, this is the content of the <tt>sample.xhtml</tt> file.</p>
     <p>And here's yet another paragraph from that file.</p>
   </body>
 </html>

Modified: cocoon/trunk/src/webapp/samples/aggregation/content/test.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/webapp/samples/aggregation/content/test.xml?rev=170045&r1=170044&r2=170045&view=diff
==============================================================================
--- cocoon/trunk/src/webapp/samples/aggregation/content/test.xml (original)
+++ cocoon/trunk/src/webapp/samples/aggregation/content/test.xml Fri May 13 08:45:48 2005
@@ -19,16 +19,16 @@
   <content>
     <para><b><![CDATA[<xi:include href="test3.xml"/>]]></b></para>
     <xi:include href="test3.xml"/>
-
     <hr/>
+
     <para><b><![CDATA[<xi:include href="test2.xml#xpointer(/page/content/para[2])"/>]]></b></para>
     <xi:include href="test2.xml#xpointer(/page/content/para[2])"/>
-
     <hr/>
+
     <para><b><![CDATA[<xi:include href="test2.xml#xmlns(my=http://localhost/my)xpointer(/page/content/my:abc/*)"/>]]></b></para>
     <xi:include href="test2.xml#xmlns(my=http://localhost/my)xpointer(/page/content/my:abc/*)"/>
-
     <hr/>
+
     <para><b>Inclusion with an invalid xpointer expression, will cause fallback
         element content to be inserted:</b></para>
     <para><b><![CDATA[<xi:include href="test2.xml#xpointer(">]]></b></para>
@@ -44,23 +44,38 @@
       And here's some more text you shouldn't see.
     </xi:include>
     <hr/>
+
     <para><b><![CDATA[
     <xi:include href="#xmlns(xi=http://www.w3.org/2001/XInclude)xpointer(/page/content/xi:include[1])"/>
         ]]></b></para>
     <xi:include href="#xmlns(xi=http://www.w3.org/2001/XInclude)xpointer(/page/content/xi:include[1])"/>
-
     <hr/>
+
     <para><b>This sample demonstrates the recursive inclusion: here file4.xml
         is included, which in itself includes file5.xml:</b></para>
     <para><b><![CDATA[<xi:include href="test4.xml"/>]]></b></para>
     <xi:include href="test4.xml"/>
-
     <hr/>
+
     <para><b>This example shows how you can put multiple xpointer expressions
         one after the other. If one doesn't return a result, it is skipped and
         the next one is evaluated, until one is found that returns a
         result.</b></para>
     <para><b><![CDATA[<xi:include href="test2.xml#xpointer(/x)xpointer(/y)xpointer(/z)xpointer(/page/content/para[2])"/>]]></b></para>
     <xi:include href="test2.xml#xpointer(/x)xpointer(/y)xpointer(/z)xpointer(/page/content/para[2])"/>
+
+    <para><b>Double fallback:</b></para>
+    <xi:include href="test1.xml">
+      <xi:fallback>
+        An error occured! You should not be seeing this.
+        <xi:include href="test1.xml">
+          <xi:fallback>
+            Double error occured! This is the content of the fallback element you're seeing.
+          </xi:fallback>
+        </xi:include>
+      </xi:fallback>
+    </xi:include>
+    <hr/>
+  
   </content>
 </page>

Copied: cocoon/trunk/src/webapp/samples/aggregation/content/xhtml.xml (from r169701, cocoon/trunk/src/webapp/samples/aggregation/content/includehtml.xml)
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/webapp/samples/aggregation/content/xhtml.xml?p2=cocoon/trunk/src/webapp/samples/aggregation/content/xhtml.xml&p1=cocoon/trunk/src/webapp/samples/aggregation/content/includehtml.xml&r1=169701&r2=170045&rev=170045&view=diff
==============================================================================
--- cocoon/trunk/src/webapp/samples/aggregation/content/includehtml.xml (original)
+++ cocoon/trunk/src/webapp/samples/aggregation/content/xhtml.xml Fri May 13 08:45:48 2005
@@ -18,9 +18,9 @@
   <title>XInclude demo</title>
   <content>
     <para>This sample will include the content of the /html/body tag of the
-      file somehtml.xhtml. This is done using the custom 'elementpath' XPointer
+      file sample.xhtml. This is done using the custom 'elementpath' XPointer
       scheme, which avoids building a DOM (which the xpointer() scheme does).</para>
-    <para><b><![CDATA[somehtml.xhtml#xmlns(c=http://apache.org/cocoon/xpointer)c:elementpath(/html/body)]]></b></para>
-    <xi:include href="somehtml.xhtml#xmlns(c=http://apache.org/cocoon/xpointer)c:elementpath(/html/body)"/>
+    <para><b><![CDATA[sample.xhtml#xmlns(c=http://apache.org/cocoon/xpointer)c:elementpath(/html/body)]]></b></para>
+    <xi:include href="sample.xhtml#xmlns(c=http://apache.org/cocoon/xpointer)c:elementpath(/html/body)"/>
   </content>
 </page>

Modified: cocoon/trunk/src/webapp/samples/aggregation/samples.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/webapp/samples/aggregation/samples.xml?rev=170045&r1=170044&r2=170045&view=diff
==============================================================================
--- cocoon/trunk/src/webapp/samples/aggregation/samples.xml (original)
+++ cocoon/trunk/src/webapp/samples/aggregation/samples.xml Fri May 13 08:45:48 2005
@@ -15,8 +15,10 @@
   limitations under the License.
 -->
 
-<!-- CVS $Id: samples.xml,v 1.5 2004/04/05 12:34:22 antonio Exp $ -->
-
+<!--
+  - Aggregation, Include, CInclude, XInclude samples.
+  - $Id$
+  -->
 <samples name="Aggregation">
 
   <group name="Back">
@@ -39,29 +41,55 @@
 
   <group name="Aggregation Sample">
     <sample name="Fixed Content Aggregation" href="aggregate">
-      Single Web Page with News from all sources above aggregated by
+      Single web page with news from all sources above aggregated by
       the sitemap aggregation facilities. This is useful when you know
       that the parts of your page to aggregate are always the same
       and never change.
     </sample>
     <sample name="Flexible Content Aggregation" href="aggregate2">
-      Single Web Page with News from all sources above aggregated by
-      the cocoon include transformer. This is useful for pages where
+      Single web page with news from all sources above aggregated by
+      the include transformer. This is useful for pages where
       the user can customize the parts of the page to aggregate.
     </sample>
+    <sample name="Parallel Content Aggregation" href="aggregate3">
+      Same as sample above, but using separate threads for obtaining
+      content from each aggregated source. This is useful when
+      aggregating several sources with large latency.
+    </sample>
+    <sample name="CInclude Content Aggregation" href="aggregate4">
+      Same as 'Flexible Content Aggregation' sample above, using
+      CInclude transformer.
+    </sample>
+    <sample name="XInclude Content Aggregation" href="aggregate5">
+      Same as 'Flexible Content Aggregation' sample above, using
+      XInclude transformer.
+    </sample>
   </group>
   
+  <group name="Include Samples">
+    <sample name="General" href="include-true-true-test">
+      Demonstration of various include features.
+    </sample>
+    <sample name="Not Recursive" href="include-true-false-test">
+      Demonstration of various include features - no recursion.
+    </sample>
+    <sample name="Not Parallel" href="include-false-true-test">
+      Demonstration of various include features - no includes in
+      parallel threads.
+    </sample>
+  </group>
+
   <group name="XInclude Samples">
     <sample name="General" href="test.html">
       Demonstration of various XInclude and XPointer features.
     </sample>
-    <sample name="XML Base" href="xmlbase.html">
+    <sample name="XML Base" href="xbase.html">
       Demonstration of xml:base support.
     </sample>
-    <sample name="Loop Inclusion" href="loopinclusion.html">
+    <sample name="Loop Inclusion" href="xloop.html">
       Example of a loop inclusion. This will show an error page.
     </sample>
-    <sample name="Elementpath XPointer Scheme" href="includehtml.html">
+    <sample name="Elementpath XPointer Scheme" href="xhtml.html">
       Example of streaming inclusion using the custom elementpath XPointer scheme.
     </sample>
   </group>

Modified: cocoon/trunk/src/webapp/samples/aggregation/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/webapp/samples/aggregation/sitemap.xmap?rev=170045&r1=170044&r2=170045&view=diff
==============================================================================
--- cocoon/trunk/src/webapp/samples/aggregation/sitemap.xmap (original)
+++ cocoon/trunk/src/webapp/samples/aggregation/sitemap.xmap Fri May 13 08:45:48 2005
@@ -15,7 +15,7 @@
   limitations under the License.
 -->
 
-<!-- CVS $Id: sitemap.xmap,v 1.4 2004/03/06 02:26:02 antonio Exp $ -->
+<!-- CVS $Id$ -->
 
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
@@ -49,7 +49,10 @@
         <map:serialize/>
       </map:match>
 
-      <!-- ================  NEWS  =========================== -->
+      <!--
+        - News sources, post processed using XSLT, for content aggregation
+        - samples.
+        -->
 
       <map:match pattern="slashdot">
         <map:generate src="http://slashdot.org/slashdot.xml"/>
@@ -77,6 +80,12 @@
         <map:serialize/>
       </map:match>
 
+
+      <!--
+        - Content aggregation samples
+        -->
+
+      <!-- Aggregation using the sitemap aggregator -->
       <map:match pattern="aggregate">
         <map:aggregate element="page">
           <!--+
@@ -118,17 +127,64 @@
         <map:serialize/>
       </map:match>
 
-      <!-- Aggregation using the Cocoon Include transformer -->
+      <!-- Aggregation using the include transformer -->
       <map:match pattern="aggregate2">
         <map:generate src="aggregate.xml"/>
-        <map:transform type="cinclude"/>
+        <map:transform type="include"/>
         <map:transform type="xsltc" src="stylesheets/news.xsl"/>
         <map:serialize/>
       </map:match>
 
-      <!-- TODO: Aggregation using the XInclude transformer -->
+      <!-- Aggregation using the include transformer, done in parallel threads -->
+      <map:match pattern="aggregate3">
+        <map:generate src="aggregate.xml"/>
+        <map:transform type="include">
+          <map:parameter name="parallel" value="true"/>
+        </map:transform>
+        <map:transform type="xsltc" src="stylesheets/news.xsl"/>
+        <map:serialize/>
+      </map:match>
+
+      <!-- Aggregation using the CInclude transformer -->
+      <map:match pattern="aggregate4">
+        <map:generate src="aggregate.xml"/>
+        <map:transform type="cinclude"/>
+        <map:transform type="xsltc" src="stylesheets/news.xsl"/>
+        <map:serialize/>
+      </map:match>
+  
+      <!-- Aggregation using the XInclude transformer -->
+      <map:match pattern="aggregate5">
+        <map:generate src="xaggregate.xml"/>
+        <map:transform type="xinclude"/>
+        <map:transform type="xsltc" src="stylesheets/news.xsl"/>
+        <map:serialize/>
+      </map:match>
   
-      <!-- XInclude Samples -->
+
+      <!--
+        - Include Samples
+        -->
+      <map:match pattern="include-*-*-*">
+        <map:generate src="content/i{3}.xml"/>
+        <map:transform type="include">
+          <map:parameter name="parallel" value="{1}"/>
+          <map:parameter name="recursive" value="{2}"/>
+        </map:transform>
+        <map:transform src="context://samples/common/style/xsl/html/simple-page2html.xsl">
+          <map:parameter name="contextPath" value="{request:contextPath}"/>
+          <map:parameter name="servletPath" value="{request:servletPath}"/>
+          <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
+          <map:parameter name="file" value="content/test.xml"/>
+          <map:parameter name="remove" value="{0}"/>
+        </map:transform>
+        <map:serialize/>
+      </map:match>
+
+
+      <!--
+        - XInclude Samples
+        -->
       <map:match pattern="*.html">
         <map:generate src="content/{1}.xml"/>
         <map:transform type="xinclude"/>

Added: cocoon/trunk/src/webapp/samples/aggregation/xaggregate.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/webapp/samples/aggregation/xaggregate.xml?rev=170045&view=auto
==============================================================================
--- cocoon/trunk/src/webapp/samples/aggregation/xaggregate.xml (added)
+++ cocoon/trunk/src/webapp/samples/aggregation/xaggregate.xml Fri May 13 08:45:48 2005
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 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.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- 
+  - Example showing aggrgation of 3 sources using XInclude.
+  -
+  - $Id$
+  -->
+<page xmlns:x="http://www.w3.org/2001/XInclude">
+    <slashdot>
+        <x:include href="cocoon:/slashdot"/>
+    </slashdot>
+    <moreover>
+        <x:include href="cocoon:/moreover"/>
+    </moreover>
+    <xmlhack>
+        <x:include href="cocoon:/xmlhack"/>
+    </xmlhack>
+</page>

Propchange: cocoon/trunk/src/webapp/samples/aggregation/xaggregate.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/src/webapp/samples/aggregation/xaggregate.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: cocoon/trunk/src/webapp/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/webapp/sitemap.xmap?rev=170045&r1=170044&r2=170045&view=diff
==============================================================================
--- cocoon/trunk/src/webapp/sitemap.xmap (original)
+++ cocoon/trunk/src/webapp/sitemap.xmap Fri May 13 08:45:48 2005
@@ -125,6 +125,7 @@
       <check-includes>true</check-includes>
     </map:transformer>
 
+    <map:transformer logger="sitemap.transformer.include" name="include" pool-max="16"
src="org.apache.cocoon.transformation.IncludeTransformer"/>
     <map:transformer logger="sitemap.transformer.xinclude" name="xinclude" pool-max="16"
src="org.apache.cocoon.transformation.XIncludeTransformer"/>
     <map:transformer logger="sitemap.transformer.cinclude" name="cinclude" pool-max="16"
src="org.apache.cocoon.transformation.CIncludeTransformer"/>
     <map:transformer logger="sitemap.transformer.encodeURL" name="encodeURL" src="org.apache.cocoon.transformation.EncodeURLTransformer"/>

Modified: cocoon/trunk/status.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/status.xml?rev=170045&r1=170044&r2=170045&view=diff
==============================================================================
--- cocoon/trunk/status.xml (original)
+++ cocoon/trunk/status.xml Fri May 13 08:45:48 2005
@@ -440,6 +440,18 @@
    </action>
   </release>
   <release version="2.1.8" date="TBD">
+    <action dev="VG" type="add">
+      IncludeTransformer moved from the scratchpad into the core. It has following
+      features:
+      <ul>
+        <li>Supports caching, with configurable caching key.</li>
+        <li>Supports parallel include processing in multiple threads.</li>
+        <li>Included source URIs resolved relative to the document URI.</li>
+        <li>Supports recursive include processing (includes in included files).</li>
+        <li>Supports fallback element processing.</li>
+        <li>Supports inclusion of files as text.</li>
+      </ul>
+    </action>
     <action dev="VG" type="fix" fixes-bug="25098">
       Databases: SQLTransformer: Support queries nested into insert/delete/update
       queries. Return number of rows updated by insert/delete/update queries as



Mime
View raw message