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 2007/12/22 05:22:38 UTC

svn commit: r606392 - in /cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF: ./ aggregation/ catalog/ components/ flow/prefs/ flow/test/ i18n/ modules/

Author: vgritsenko
Date: Fri Dec 21 20:22:38 2007
New Revision: 606392

URL: http://svn.apache.org/viewvc?rev=606392&view=rev
Log:
Switch /catalog, /i18n to servletServices.
Cleanup.

Modified:
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/aggregation/sitemap.xmap
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/catalog/catalog-demo.xml
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/catalog/sitemap.xmap
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/catalog/style.xsl
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/components/sitemap.xmap
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/prefs/sitemap.xmap
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/test/sitemap.xmap
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/i18n/sitemap.xmap
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/modules/sitemap.xmap
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/aggregation/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/aggregation/sitemap.xmap?rev=606392&r1=606391&r2=606392&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/aggregation/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/aggregation/sitemap.xmap Fri Dec 21 20:22:38 2007
@@ -236,12 +236,6 @@
         </map:serialize>
       </map:match>
 
-
-      <!-- This Sitemap -->
-      <map:match pattern="sitemap.xmap">
-        <map:read src="sitemap.xmap" mime-type="text/xml"/>
-      </map:match>
-
       <!-- Source Files -->
       <map:match pattern="*.xml">
         <map:generate src="content/{1}.xml"/>

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/catalog/catalog-demo.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/catalog/catalog-demo.xml?rev=606392&r1=606391&r2=606392&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/catalog/catalog-demo.xml (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/catalog/catalog-demo.xml Fri Dec 21 20:22:38 2007
@@ -17,72 +17,74 @@
 -->
 
 <!DOCTYPE catalog-demo PUBLIC "-//Indexgeo//DTD Catalog Demo v1.0//EN"
-  "http://www.indexgeo.com.au/dtd/catalog-demo-v10.dtd"
+                              "http://www.indexgeo.com.au/dtd/catalog-demo-v10.dtd"
 [
- <!ENTITY testpub PUBLIC "-//Arbortext//TEXT Test Public Identifier//EN"
-   "bogus-system-identifier.xml">
- <!ENTITY testsys SYSTEM "urn:x-arbortext:test-system-identifier">
- <!ENTITY testovr PUBLIC "-//Arbortext//TEXT Test Override//EN"
-   "testovr.txt">
- <!ENTITY % ISOnum PUBLIC
-   "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"
-   "ISOnum.pen">
- %ISOnum;
- <!ENTITY note "Note:">
+  <!ENTITY testpub PUBLIC "-//Arbortext//TEXT Test Public Identifier//EN"
+                          "bogus-system-identifier.xml">
+  <!ENTITY testsys SYSTEM "urn:x-arbortext:test-system-identifier">
+  <!ENTITY testovr PUBLIC "-//Arbortext//TEXT Test Override//EN"
+                          "testovr.txt">
+  <!ENTITY % ISOnum PUBLIC "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"
+                           "ISOnum.pen">
+  %ISOnum;
+  <!ENTITY note "Note:">
 ]>
 
+<!--
+  - $Id$
+  -->
 <catalog-demo>
- <section>
-  <para>This sample application demonstrates the use of catalogs for
-   entity resolution. &note; see the Apache Cocoon documentation
-   <link href="../../docs/userdocs/concepts/catalog.html">Entity resolution with
-   catalogs</link> for the full background and explanation, and the XML
-   source of this document (catalog-demo.xml).
-  </para>
-
-  <para>This top-level XML instance document is catalog-demo.xml - it declares
-   three other XML sub-documents as external entities and then includes
-   them in the sections below. The real system identifiers will be looked
-   up in the catalog, to resolve the actual location of the resource.
-  </para>
-
-  <para>The Document Type Definition (DTD) is declared using both a public
-   identifier and a system identifier. The system identifier for the DTD is
-   a network-based resource (which is deliberately non-existent). However,
-   the catalog overrides that remote DTD to instead use a copy from the
-   local filesystem at the location defined by the catalog entry. Note that
-   it is via the use of a public identifier that we gain this power.
-  </para>
-
-  <para>The internal DTD subset of the top-level document instance goes on
-   to declare the three external sub-document entities using various means.
-   It also declares and includes the ISOnum set of character entities,
-   so that we can use entities like "&amp;frac12;" (to represent &frac12;).
-   Finally the internal DTD subset declares an internal general entity
-   for &quot;&amp;note;&quot;.
-  </para>
- </section>
-
- <section>
-  <para>testpub ... this entity is declared with a PUBLIC identifier and a
-   bogus system identifier (which will be overridden by the catalog)
-  </para>
-  <para>&note; &testpub;</para>
- </section>
-
- <section>
-  <para>testsys ... this entity is declared with a SYSTEM identifier
-   (which will be resolved by the catalog)
-  </para>
-  <para>&note; &testsys;</para>
- </section>
-
- <section>
-  <para>testovr ... is declared with a PUBLIC identifier and a system
-   identifier (the catalog is set to not override this one, so the
-   declared system identifier is used)
-  </para>
-  <para>&note; &testovr;</para>
- </section>
+  <section>
+    <para>This sample application demonstrates the use of catalogs for
+      entity resolution. &note; see the Apache Cocoon documentation
+      <link href="http://cocoon.apache.org/2.1/userdocs/concepts/catalog.html">Entity resolution with
+        catalogs</link> for the full background and explanation, and the XML
+      source of this document (catalog-demo.xml).
+    </para>
+
+    <para>This top-level XML instance document is catalog-demo.xml - it declares
+      three other XML sub-documents as external entities and then includes
+      them in the sections below. The real system identifiers will be looked
+      up in the catalog, to resolve the actual location of the resource.
+    </para>
+
+    <para>The Document Type Definition (DTD) is declared using both a public
+      identifier and a system identifier. The system identifier for the DTD is
+      a network-based resource (which is deliberately non-existent). However,
+      the catalog overrides that remote DTD to instead use a copy from the
+      local filesystem at the location defined by the catalog entry. Note that
+      it is via the use of a public identifier that we gain this power.
+    </para>
+
+    <para>The internal DTD subset of the top-level document instance goes on
+      to declare the three external sub-document entities using various means.
+      It also declares and includes the ISOnum set of character entities,
+      so that we can use entities like "&amp;frac12;" (to represent &frac12;).
+      Finally the internal DTD subset declares an internal general entity
+      for &quot;&amp;note;&quot;.
+    </para>
+  </section>
+
+  <section>
+    <para>testpub ... this entity is declared with a PUBLIC identifier and a
+      bogus system identifier (which will be overridden by the catalog)
+    </para>
+    <para>&note; &testpub;</para>
+  </section>
+
+  <section>
+    <para>testsys ... this entity is declared with a SYSTEM identifier
+      (which will be resolved by the catalog)
+    </para>
+    <para>&note; &testsys;</para>
+  </section>
+
+  <section>
+    <para>testovr ... is declared with a PUBLIC identifier and a system
+      identifier (the catalog is set to not override this one, so the
+      declared system identifier is used)
+    </para>
+    <para>&note; &testovr;</para>
+  </section>
 
 </catalog-demo>

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/catalog/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/catalog/sitemap.xmap?rev=606392&r1=606391&r2=606392&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/catalog/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/catalog/sitemap.xmap Fri Dec 21 20:22:38 2007
@@ -55,22 +55,22 @@
         </map:serialize>
       </map:match>
 
-      <map:match pattern="sitemap.xmap">
-        <map:read src="sitemap.xmap" mime-type="text/xml" />
-      </map:match>
-
       <!-- ================ Catalog entity resolver ======================== -->
 
       <map:match pattern="catalog-demo">
         <map:generate src="catalog-demo.xml"/>
         <map:transform src="style.xsl"/>
-        <map:serialize type="html"/>
+        <map:serialize type="servletService">
+          <map:parameter name="service" value="servlet:style:/service/common/simple-page2html"/>
+        </map:serialize>
       </map:match>
 
       <map:match pattern="entity-test.html">
         <map:generate src="catalog-test.xml"/>
         <map:transform src="style.xsl"/>
-        <map:serialize type="html"/>
+        <map:serialize type="servletService">
+          <map:parameter name="service" value="servlet:style:/service/common/simple-page2html"/>
+        </map:serialize>
       </map:match>
 
       <map:match pattern="sdocbook-demo">
@@ -82,7 +82,7 @@
       <!-- ======================== Resources ============================== -->
 
       <map:match pattern="images/**.gif">
-        <map:read src="context://resources/images/{1}.gif" mime-type="image/gif"/>
+        <map:read src="servlet:style:/images/{1}.gif" mime-type="image/gif"/>
       </map:match>
 
     </map:pipeline>

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/catalog/style.xsl
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/catalog/style.xsl?rev=606392&r1=606391&r2=606392&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/catalog/style.xsl (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/catalog/style.xsl Fri Dec 21 20:22:38 2007
@@ -17,47 +17,41 @@
 -->
 
 <!DOCTYPE xsl:stylesheet [
- <!ENTITY % ISOnum PUBLIC
-   "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"
-   "ISOnum.pen">
- %ISOnum;
+  <!ENTITY % ISOnum PUBLIC "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"
+                           "ISOnum.pen">
+  %ISOnum;
 ]>
 
+<!--
+  - $Id$
+  -->
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 version='1.0'>
 
-<xsl:output method="html"/>
-
-<xsl:template match="catalog-demo">
-<html>
- <head>
-  <title>Demonstration of entity resolution using catalogs</title>
- </head>
- <body>
-  <xsl:apply-templates/>
-  <p>
-   This footer is applied by the stylesheet. The following entity is resolved
-   by the parser when it interprets the stylesheet
-   <br/>Use &amp;frac14; to represent &frac14; (one-quarter symbol)
-   <br/>The ISOnum entity set was declared in the header of the stylesheet.
-  </p>
- </body>
-</html>
-</xsl:template>
-
-<xsl:template match="section">
- <xsl:apply-templates/>
-<hr/>
-</xsl:template>
-
-<xsl:template match="para">
-<p>
- <xsl:apply-templates/>
-</p>
-</xsl:template>
-
-<xsl:template match="link">
-<a href="{@href}"><xsl:apply-templates/></a>
-</xsl:template>
-
+  <xsl:template match="catalog-demo">
+    <page>
+      <title>Demonstration of entity resolution using catalogs</title>
+      <content>
+        <xsl:apply-templates/>
+        <p>
+          This footer is applied by the stylesheet. The following entity is resolved
+          by the parser when it interprets the stylesheet
+          <br/>Use &amp;frac14; to represent &frac14; (one-quarter symbol)
+          <br/>The ISOnum entity set was declared in the header of the stylesheet.
+        </p>
+      </content>
+    </page>
+  </xsl:template>
+
+  <xsl:template match="section">
+    <xsl:apply-templates/>
+    <hr/>
+  </xsl:template>
+
+  <xsl:template match="@*|node()" priority="-1">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+  
 </xsl:stylesheet>

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/components/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/components/sitemap.xmap?rev=606392&r1=606391&r2=606392&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/components/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/components/sitemap.xmap Fri Dec 21 20:22:38 2007
@@ -51,10 +51,6 @@
         </map:serialize>
       </map:match>
 
-      <map:match pattern="sitemap.xmap">
-        <map:read src="sitemap.xmap" mime-type="text/xml"/>
-      </map:match>
-
       <!-- ========================= Stream ================================ -->
 
       <map:match pattern="order">

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/prefs/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/prefs/sitemap.xmap?rev=606392&r1=606391&r2=606392&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/prefs/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/prefs/sitemap.xmap Fri Dec 21 20:22:38 2007
@@ -49,21 +49,15 @@
   <!-- =========================== Pipelines =============================== -->
 
   <map:pipelines>
-    <map:pipeline>
+    <map:pipeline internal-only="true">
       <!--
         - Produces the views called by the flowscript
         -->
       <map:match pattern="page/*">
         <map:generate type="jx" src="screens/{1}.xml"/>
-        <map:transform src="servlet:style:/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="file" value="servlet:/flow/prefs/screens/{1}.xsp"/>
-          <map:parameter name="remove" value="{0}"/>
-        </map:transform>
-        <map:transform type="servletLinkRewriter"/>
-        <map:serialize/>
+        <map:serialize type="servletService">
+          <map:parameter name="service" value="servlet:style:/service/common/simple-page2html"/>
+        </map:serialize>
       </map:match>
     </map:pipeline>
 

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/test/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/test/sitemap.xmap?rev=606392&r1=606391&r2=606392&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/test/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/test/sitemap.xmap Fri Dec 21 20:22:38 2007
@@ -43,11 +43,19 @@
   <!-- =========================== Pipelines =============================== -->
 
   <map:pipelines>
-    <map:pipeline>
-      <map:match pattern="sendpage.js">
-        <map:read src="{0}" mime-type="text/plain"/>
+    <map:pipeline internal-only="true">
+      <!--
+        - Produces the views called by the flowscript
+        -->
+      <map:match pattern="page/*">
+        <map:generate type="jx" src="screens/{1}.xml"/>
+        <map:serialize type="servletService">
+          <map:parameter name="service" value="servlet:style:/service/common/simple-page2html"/>
+        </map:serialize>
       </map:match>
-    
+    </map:pipeline>
+
+    <map:pipeline>
       <map:match pattern="">
         <map:redirect-to uri="showString"/>
       </map:match>
@@ -62,17 +70,8 @@
         <map:call function="factorial"/>
       </map:match>
 
-      <map:match pattern="page/*">
-        <map:generate type="jx" src="screens/{1}.xml"/>
-        <map:transform src="servlet:style:/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="file" value="servlet:/flow/test/screens/{1}.xsp"/>
-          <map:parameter name="remove" value="{0}"/>
-        </map:transform>
-        <map:transform type="servletLinkRewriter" />
-        <map:serialize/>
+      <map:match pattern="sendpage.js">
+        <map:read src="{0}" mime-type="text/plain"/>
       </map:match>
     </map:pipeline>
   </map:pipelines>

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/i18n/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/i18n/sitemap.xmap?rev=606392&r1=606391&r2=606392&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/i18n/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/i18n/sitemap.xmap Fri Dec 21 20:22:38 2007
@@ -96,9 +96,9 @@
         <map:parameter name="page" value="{../0}"/>
         <map:parameter name="locale" value="{../../locale}"/>
       </map:transform>
-      <map:transform src="servlet:style:/common/style/xsl/html/simple-page2html.xsl"/>
-      <map:transform type="servletLinkRewriter"/>
-      <map:serialize type="html"/>
+      <map:serialize type="servletService">
+        <map:parameter name="service" value="servlet:style:/service/common/simple-page2html"/>
+      </map:serialize>
     </map:resource>
   </map:resources>
 

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/modules/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/modules/sitemap.xmap?rev=606392&r1=606391&r2=606392&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/modules/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/modules/sitemap.xmap Fri Dec 21 20:22:38 2007
@@ -51,9 +51,9 @@
       <map:transform src="composite2page.xsl">
         <map:parameter name="page" value="{../0}"/>
       </map:transform>
-      <map:transform src="servlet:style:/common/style/xsl/html/simple-page2html.xsl"/>
-      <map:transform type="servletLinkRewriter"/>
-      <map:serialize type="html"/>
+      <map:serialize type="servletService">
+        <map:parameter name="service" value="servlet:style:/service/common/simple-page2html"/>
+      </map:serialize>
     </map:resource>
   </map:resources>
 

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap?rev=606392&r1=606391&r2=606392&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap Fri Dec 21 20:22:38 2007
@@ -56,13 +56,11 @@
       </map:match>
 
       <map:match pattern="sitemap.xmap">
-        <map:generate src="sitemap.xmap"/>
-        <map:serialize type="xml"/>
+        <map:read src="sitemap.xmap" mime-type="text/xml"/>
       </map:match>
 
       <map:match pattern="**/sitemap.xmap">
-        <map:generate src="{1}/sitemap.xmap"/>
-        <map:serialize type="xml"/>
+        <map:read src="{0}" mime-type="text/xml"/>
       </map:match>
 
       <map:match pattern="*/**">