cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r595117 - in /cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF: hello-world/content/ sources/ sources/content/ sources/style/
Date Wed, 14 Nov 2007 23:09:03 GMT
Author: vgritsenko
Date: Wed Nov 14 15:09:01 2007
New Revision: 595117

URL: http://svn.apache.org/viewvc?rev=595117&view=rev
Log:
fixing samples and doing cleanup

Modified:
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/hello-world/content/hello.xml
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/hello-world/content/hello_zip.xml
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/content/dynamic.xsp
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/content/simple.xml
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/content/simple.xsp
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/content/upload.xml
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/sitemap.xmap
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/style/simple-page2html.xsp
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/xsp.xmap

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/hello-world/content/hello.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/hello-world/content/hello.xml?rev=595117&r1=595116&r2=595117&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/hello-world/content/hello.xml
(original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/hello-world/content/hello.xml
Wed Nov 14 15:09:01 2007
@@ -16,11 +16,12 @@
   limitations under the License.
 -->
 
-<!-- CVS $Id$ -->
-
+<!--
+  - $Id$
+  -->
 <page>
- <title>Hello</title>
- <content>
-  <para>This is my first Cocoon page!</para>
- </content>
+  <title>Hello</title>
+  <content>
+    <para>This is my first Cocoon page!</para>
+  </content>
 </page>

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/hello-world/content/hello_zip.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/hello-world/content/hello_zip.xml?rev=595117&r1=595116&r2=595117&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/hello-world/content/hello_zip.xml
(original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/hello-world/content/hello_zip.xml
Wed Nov 14 15:09:01 2007
@@ -15,9 +15,9 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
+
 <zip-archive:archive xmlns:zip-archive="http://apache.org/cocoon/zip-archive/1.0">
   <zip-archive:entry name="hello.xml" src="cocoon:/hello.xml"/>
   <zip-archive:entry name="hello.html" src="cocoon:/hello.html"/>
   <zip-archive:entry name="hello.svg" src="cocoon:/hello.svg"/>
 </zip-archive:archive>
-

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/content/dynamic.xsp
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/content/dynamic.xsp?rev=595117&r1=595116&r2=595117&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/content/dynamic.xsp
(original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/content/dynamic.xsp
Wed Nov 14 15:09:01 2007
@@ -16,33 +16,35 @@
   limitations under the License.
 -->
 
-<!-- CVS $Id$ -->
-
+<!--
+  - $Id$
+  -->
 <xsp:page language="java"
           xmlns:xsp="http://apache.org/xsp"
           xmlns:an-xsp="urn:xsp"
           xmlns:an-xsp-request="urn:xsp-request">
 
-<an-xsp:page language="java">
-
-  <page>
-    <title>Dynamic XSP page, served by sub-sitemap</title>
+  <an-xsp:page language="java">
+    <page>
+      <title>Dynamic XSP page, served by sub-sitemap</title>
 
-    <content>
-      <para>Hi there! I'm a very complex dynamic page generated by XSP
-        (eXtensible Server Pages), with source dynamically generated by XSP.
-        Nobody should use such complex constructs while in good health :)</para>
-      <para>
-        My source resides in the file <b>cocoon/sub/docs/dynamic.xsp</b>.</para>
-      <para>
-        My source was generated by XSP at <b><xsp:expr>new Date()</xsp:expr></b>.</para>
-      <para>I know that I was requested as the URI <b>
-        <an-xsp-request:get-uri as="xml"/></b>,
-        and executed at <b><an-xsp:expr>new Date()</an-xsp:expr></b>
-        by <b><an-xsp:expr>Constants.COMPLETE_NAME</an-xsp:expr></b>.
-      </para>
-    </content>
-  </page>
-</an-xsp:page>
+      <content>
+        <para>Hi there! I'm a very complex dynamic page generated by XSP
+          (eXtensible Server Pages), with source dynamically generated by XSP.
+          Nobody should use such complex constructs while in good health :)</para>
+        <para>
+          My source resides in the file <b>COB-INF/sources/content/dynamic.xsp</b>.
+        </para>
+        <para>
+          My source was generated by XSP at <b><xsp:expr>new Date()</xsp:expr></b>.
+        </para>
+        <para>
+          I know that I was requested as the URI <b> <an-xsp-request:get-uri as="xml"/></b>,
+          and executed at <b><an-xsp:expr>new Date()</an-xsp:expr></b>
+          by <b><an-xsp:expr>Constants.COMPLETE_NAME</an-xsp:expr></b>.
+        </para>
+      </content>
+    </page>
+  </an-xsp:page>
 
 </xsp:page>

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/content/simple.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/content/simple.xml?rev=595117&r1=595116&r2=595117&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/content/simple.xml
(original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/content/simple.xml
Wed Nov 14 15:09:01 2007
@@ -16,15 +16,16 @@
   limitations under the License.
 -->
 
-<!-- CVS $Id$ -->
-
+<!--
+  - $Id$
+  -->
 <page>
   <title>Simple static page, served by sub-sitemap</title>
   <content>
     <para>
       Hi there! I'm a simple static page read from the file.</para>
     <para>
-      My source resides in the file <b>samples/sources/content/simple.xml</b></para>
+      My source resides in the file <b>COB-INF/sources/content/simple.xml</b></para>
     <para>
       I know nothing about the environment which is using me.</para>
   </content>

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/content/simple.xsp
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/content/simple.xsp?rev=595117&r1=595116&r2=595117&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/content/simple.xsp
(original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/content/simple.xsp
Wed Nov 14 15:09:01 2007
@@ -16,8 +16,9 @@
   limitations under the License.
 -->
 
-<!-- CVS $Id$ -->
-
+<!--
+  - $Id$
+  -->
 <xsp:page language="java"
           xmlns:xsp="http://apache.org/xsp"
           xmlns:xsp-request="http://apache.org/xsp/request/2.0">
@@ -29,11 +30,13 @@
       <para>Hi there! I'm a simple dynamic page generated by XSP
         (eXtensible Server Pages).</para>
       <para>
-        My source resides in the file <b>samples/sources/content/simple.xsp</b>.</para>
-      <para>I know that I was requested as the URI 
-        <b><xsp-request:get-uri as="xml"/></b>,
-        and executed at <b><xsp:expr>new Date()</xsp:expr></b>
-        by <b><xsp:expr>Constants.COMPLETE_NAME</xsp:expr></b>.
+        My source resides in the file <b>COB-INF/sources/content/simple.xsp</b>.
+      </para>
+
+      <para>
+        I know that I was requested as the URI <b><xsp-request:get-uri as="xml"/></b>,
+        and executed at <b><xsp:expr>new Date()</xsp:expr></b> by
+        <b><xsp:expr>Constants.COMPLETE_NAME</xsp:expr></b>.
       </para>
     </content>
   </page>

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/content/upload.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/content/upload.xml?rev=595117&r1=595116&r2=595117&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/content/upload.xml
(original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/content/upload.xml
Wed Nov 14 15:09:01 2007
@@ -16,28 +16,31 @@
   limitations under the License.
 -->
 
-<!-- CVS $Id$ -->
-
+<!--
+  - $Id$
+  -->
 <page>
   <title>Demonstrate file upload as source</title>
   <content>
     <para>
-      Hi there! I'm a simple static page read from a file, but that's not the 
-      interesting part of this sample.  Select any xml file from your local 
-      drive, and upload it.  The resulting page will display that xml transformed 
+      Hi there! I'm a simple static page read from a file, but that's not the
+      interesting part of this sample.  Select any xml file from your local
+      drive, and upload it.  The resulting page will display that xml transformed
       by a stylesheet (which could also be provided via upload).
     </para>
     <para>
-      You must have configured enable-uploads as true in web.xml or built Cocoon 
+      You must have configured enable-uploads as true in web.xml or built Cocoon
       with the config.enable-uploads=true property set for this sample to work.
     </para>
+
     <para>
-    	<form method="post" enctype="multipart/form-data" action="xml-upload-post" >
-    	File:  <input type="file" name="formFieldOne" size="50" />
-         <p>
-           <input type="submit" value="Upload File" />
-         </p>
-    	</form>
+      <form method="post" enctype="multipart/form-data" action="xml-upload-post">
+        File:
+        <input type="file" name="formFieldOne" size="50"/>
+        <p>
+          <input type="submit" value="Upload File"/>
+        </p>
+      </form>
     </para>
   </content>
 </page>

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/sitemap.xmap?rev=595117&r1=595116&r2=595117&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/sitemap.xmap
(original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/sitemap.xmap
Wed Nov 14 15:09:01 2007
@@ -16,27 +16,26 @@
   limitations under the License.
 -->
 
-<!--+
-    | $Id$
-    +-->
+<!--
+  - $Id$
+  -->
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
   <!-- =========================== Views =================================== -->
 
   <map:views>
     <map:view name="content" from-label="content">
-      <map:serialize type="xml" />
+      <map:serialize type="xml"/>
     </map:view>
 
     <map:view from-label="content" name="pretty-content">
-      <!-- Make use of servlet services -->
       <map:serialize type="servletService">
-        <map:parameter name="service" value="servlet:style-default:/service/system/xml2html"
/>
+        <map:parameter name="service" value="servlet:style-default:/service/system/xml2html"/>
       </map:serialize>
     </map:view>
 
     <map:view name="links" from-position="last">
-      <map:serialize type="links" />
+      <map:serialize type="links"/>
     </map:view>
   </map:views>
 
@@ -45,120 +44,120 @@
   <map:pipelines>
     <map:pipeline>
       <map:match pattern="">
-        <map:redirect-to uri="welcome" />
+        <map:redirect-to uri="welcome"/>
       </map:match>
 
       <map:match pattern="welcome">
-        <map:generate src="samples.xml" />
-        <!-- Make use of servlet services -->
+        <map:generate src="samples.xml"/>
         <map:serialize type="servletService">
-          <map:parameter name="service" value="servlet:style-default:/service/common/simple-samples2html"
/>
+          <map:parameter name="service" value="servlet:style-default:/service/common/simple-samples2html"/>
         </map:serialize>
       </map:match>
 
       <!-- All Static. -->
       <map:match pattern="all-static">
         <map:generate src="content/simple.xml" />
-        <!-- Make use of servlet services -->
         <map:serialize type="servletService">
           <map:parameter name="service" value="servlet:style-default:/service/common/simple-page2html"
/>
         </map:serialize>
       </map:match>
 
       <map:match pattern="xsp/**">
-        <map:mount uri-prefix="xsp" src="xsp.xmap" />
+        <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:generate src="content/simple.xml"/>
+          <map:serialize type="servletService">
+            <map:parameter name="service" value="servlet:style-default:/service/common/simple-page2html"
/>
+          </map:serialize>
         </map:match>
 
         <!-- Generate XSL source from local file -->
         <map:match pattern="xsl-source">
-          <map:generate src="servlet:style-default:/common/style/xsl/html/simple-page2html.xsl"
/>
-          <map:serialize type="xml" />
+          <map:generate src="servlet:style-default:/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:transform type="servletLinkRewriter" />
-          <map:serialize />
+          <map:generate src="content/simple.xml"/>
+          <map:transform src="cocoon:/xsl-source"/>
+          <map:transform type="servletLinkRewriter"/>
+          <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://servlet:/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:generate src="content/simple.xml"/>
+          <map:transform src="cocoon://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: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:generate src="content/simple.xml"/>
+          <map:transform src="http://{request:serverName}:{request:serverPort}/{request:contextPath}/{servlet:/}/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: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: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: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:serialize/>
         </map:match>
       </map:match>
 
 
       <!-- Uploaded xml as source. Beware: Very cool! -->
       <map:match pattern="xml-upload">
-        <map:generate src="content/upload.xml" />
+        <map:generate src="content/upload.xml"/>
         <!-- Make use of servlet services -->
         <map:serialize type="servletService">
-          <map:parameter name="service" value="servlet:style-default:/service/common/simple-page2html"
/>
+          <map:parameter name="service" value="servlet:style-default:/service/common/simple-page2html"/>
         </map:serialize>
       </map:match>
 
       <map:match pattern="xml-upload-post">
-        <map:generate src="upload://formFieldOne" />
+        <map:generate src="upload://formFieldOne"/>
         <!-- Make use of servlet services -->
         <map:serialize type="servletService">
-          <map:parameter name="service" value="servlet:style-default:/service/system/xml2html"
/>
+          <map:parameter name="service" value="servlet:style-default:/service/system/xml2html"/>
         </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: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:generate src="zip:test.sxw!/content.xml"/>
+        <map:serialize type="xml"/>
       </map:match>
 
     </map:pipeline>

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/style/simple-page2html.xsp
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/style/simple-page2html.xsp?rev=595117&r1=595116&r2=595117&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/style/simple-page2html.xsp
(original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/style/simple-page2html.xsp
Wed Nov 14 15:09:01 2007
@@ -16,8 +16,9 @@
   limitations under the License.
 -->
 
-<!-- CVS $Id$ -->
-
+<!--
+  - $Id$
+  -->
 <xsp:page language="java"
           xmlns:xsp="http://apache.org/xsp"
           xmlns:xsp-request="http://apache.org/xsp/request/2.0"
@@ -26,42 +27,44 @@
 <xsl:stylesheet version="1.0">
 
   <xsl:template match="page">
-   <html>
-    <head>
-     <title>
-      <xsl:value-of select="title"/>
-     </title>
-    </head>
-    <body bgcolor="white" alink="red" link="blue" vlink="blue">
-     <xsl:apply-templates/>
-    </body>
-   </html>
+    <html>
+      <head>
+        <title>
+          <xsl:value-of select="title"/>
+        </title>
+      </head>
+      <body bgcolor="white" alink="red" link="blue" vlink="blue">
+        <xsl:apply-templates/>
+      </body>
+    </html>
   </xsl:template>
 
   <xsl:template match="title">
-   <h2 style="color: navy; text-align: center">
-    <xsl:apply-templates/>
-   </h2>
+    <h2 style="color: navy; text-align: center">
+      <xsl:apply-templates/>
+    </h2>
   </xsl:template>
 
   <xsl:template match="para">
-   <p align="left">
-    <i>
-     <xsl:apply-templates/>
-    </i>
-   </p>
-   <xsl:if test="not(following-sibling::para)">
-     <p align="left">
-       <i>Note from the stylesheet:<br/>
-       Page above was processed by dynamic XSL stylesheet
-       generated by XSP (eXtensible Server Pages).<br/>
-       My source could be found in the file
-       <b>cocoon/sub/stylesheets/simple-page2html.xsp</b>.<br/>
-       I know that I was executed at <b><xsp:expr>new Date()</xsp:expr></b>
-       by <b><xsp:expr>Constants.COMPLETE_NAME</xsp:expr></b>.
-       </i>
-     </p>
-   </xsl:if>
+    <p align="left">
+      <i><xsl:apply-templates/></i>
+    </p>
+    <xsl:if test="not(following-sibling::para)">
+      <p align="left">
+        <i>Note from the stylesheet:
+          <br/>
+          Page above was processed by dynamic XSL stylesheet
+          generated by XSP (eXtensible Server Pages).
+          <br/>
+          My source could be found in the file
+          <b>cocoon/sub/stylesheets/simple-page2html.xsp</b>.
+          <br/>
+          I know that I was executed at
+          <b><xsp:expr>new Date()</xsp:expr></b> by
+          <b> <xsp:expr>Constants.COMPLETE_NAME</xsp:expr></b>.
+        </i>
+      </p>
+    </xsl:if>
   </xsl:template>
 
   <xsl:template match="@*|node()" priority="-1">

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/xsp.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/xsp.xmap?rev=595117&r1=595116&r2=595117&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/xsp.xmap
(original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sources/xsp.xmap
Wed Nov 14 15:09:01 2007
@@ -16,24 +16,26 @@
   limitations under the License.
 -->
 
+<!--
+  - $Id$
+  -->
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
   <!-- =========================== Views =================================== -->
 
   <map:views>
     <map:view name="content" from-label="content">
-      <map:serialize type="xml" />
+      <map:serialize type="xml"/>
     </map:view>
 
     <map:view from-label="content" name="pretty-content">
-      <!-- Make use of servlet services -->
       <map:serialize type="servletService">
-        <map:parameter name="service" value="servlet:style-default:/service/system/xml2html"
/>
+        <map:parameter name="service" value="servlet:style-default:/service/system/xml2html"/>
       </map:serialize>
     </map:view>
 
     <map:view name="links" from-position="last">
-      <map:serialize type="links" />
+      <map:serialize type="links"/>
     </map:view>
   </map:views>
 
@@ -41,72 +43,71 @@
 
   <map:pipelines>
     <map:pipeline>
-
       <!-- Generate XSL source dynamically using XSP page. -->
       <map:match pattern="xsl-dynamic-source">
-        <map:generate type="serverpages" src="style/simple-page2html.xsp" />
-        <map:serialize type="xml" />
+        <map:generate type="serverpages" src="style/simple-page2html.xsp"/>
+        <map:serialize type="xml"/>
       </map:match>
 
       <!-- All Dynamic. Beware: Very slow! -->
       <map:match pattern="all-dynamic">
-        <map:generate type="serverpages" src="cocoon:/dynamic-source" />
+        <map:generate type="serverpages" src="cocoon:/dynamic-source"/>
         <map:transform src="cocoon:/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.xsp" />
+          <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.xsp"/>
         </map:transform>
-        <map:serialize />
+        <map:serialize/>
       </map:match>
 
       <map:match pattern="**">
         <!-- XSP obtained from the local file, and executed -->
         <map:match pattern="file">
-          <map:generate type="serverpages" src="content/simple.xsp" />
+          <map:generate type="serverpages" src="content/simple.xsp"/>
         </map:match>
 
         <!-- Generate XSP source from local file -->
         <map:match pattern="source">
-          <map:generate src="content/simple.xsp" />
-          <map:serialize type="xml" />
+          <map:generate src="content/simple.xsp"/>
+          <map:serialize type="xml"/>
         </map:match>
 
         <!-- XSP obtained from the matcher 'xsp-source', right above, and executed -->
         <map:match pattern="cocoon">
-          <map:generate type="serverpages" src="cocoon:/source" />
+          <map:generate type="serverpages" src="cocoon:/source"/>
         </map:match>
 
         <!-- XSP obtained from the matcher 'xsp-source', absolute reference, and executed
-->
         <map:match pattern="cocoon-root">
-          <map:generate type="serverpages" src="cocoon://servlet:/sources/xsp/source"
/>
+          <map:generate type="serverpages" src="cocoon://sources/xsp/source"/>
         </map:match>
 
         <!-- XSP obtained from the external HTTP server, and executed -->
         <map:match pattern="http">
-          <map:generate type="serverpages" src="http://{request:serverName}:{request:serverPort}/{request:contextPath}/{servlet:/}sources/xsp/source"
/>
+          <map:generate type="serverpages"
+                        src="http://{request:serverName}:{request:serverPort}/{request:contextPath}/{servlet:/}sources/xsp/source"/>
         </map:match>
 
         <!-- Generate XSP source dynamically. -->
         <map:match pattern="dynamic-source">
-          <map:generate type="serverpages" src="content/dynamic.xsp" />
-          <map:transform src="style/dynamic-xsp2xsp.xsl" />
-          <map:serialize type="xml" />
+          <map:generate type="serverpages" src="content/dynamic.xsp"/>
+          <map:transform src="style/dynamic-xsp2xsp.xsl"/>
+          <map:serialize type="xml"/>
         </map:match>
 
         <!-- XSP obtained from the matcher 'xsp-dynamic-source'. Beware: Very slow! -->
         <map:match pattern="dynamic">
-          <map:generate type="serverpages" src="cocoon:/dynamic-source" />
+          <map:generate type="serverpages" src="cocoon:/dynamic-source"/>
         </map:match>
 
         <!-- Make use of servlet services -->
         <map:serialize type="servletService">
-          <map:parameter name="service" value="servlet:style-default:/service/common/simple-page2html"
/>
+          <map:parameter name="service" value="servlet:style-default:/service/common/simple-page2html"/>
         </map:serialize>
-
       </map:match>
 
     </map:pipeline>
   </map:pipelines>
-</map:sitemap>
\ No newline at end of file
+</map:sitemap>



Mime
View raw message