You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by ne...@apache.org on 2007/11/02 21:43:25 UTC

svn commit: r591451 - /lenya/trunk/src/pubs/default/sitemap.xmap

Author: nettings
Date: Fri Nov  2 13:43:24 2007
New Revision: 591451

URL: http://svn.apache.org/viewvc?rev=591451&view=rev
Log:
comments, whitenoise.

Modified:
    lenya/trunk/src/pubs/default/sitemap.xmap

Modified: lenya/trunk/src/pubs/default/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/sitemap.xmap?rev=591451&r1=591450&r2=591451&view=diff
==============================================================================
--- lenya/trunk/src/pubs/default/sitemap.xmap (original)
+++ lenya/trunk/src/pubs/default/sitemap.xmap Fri Nov  2 13:43:24 2007
@@ -19,15 +19,6 @@
 <!-- $Id$ -->
 
 
-<!-- ============ cruft removal project: ================
-
-   lenyabody-**  is only used internally in this sitemap and could be refactored without side effects.
-   currently we use lenyabody-raw-[edit|view], lenyabody-[edit|view], and now also document-content.
-   i'm sure this can be simplified.
-
--->
-
-
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
   <map:components>
@@ -40,37 +31,12 @@
   </map:components>
 
   <map:views>
-<!-- ============ cruft removal project: ================
-
-this view's from-label does not exist.
-
-    <map:view from-label="aggregation" name="aggregation">
-      <map:serialize type="xml"/>
-    </map:view>
-
--->
     <map:view from-position="last" name="links">
       <map:serialize type="links" />
     </map:view>
   </map:views>
 
-<!-- =========================== Resources ================================= -->
-
-<!--
-  FIXME: This seems to be unused...
 
-  <map:resources>
-    <map:resource name="style-cms-page">
-      <map:transform type="i18n">      
-        <map:parameter name="locale" value="{request:locale}"/>
-      </map:transform>    
-      <map:transform src="fallback://lenya/xslt/util/page2xhtml.xsl"/>
-      <map:transform src="context://lenya/xslt/util/strip_namespaces.xsl"/>
-      <map:transform type="proxy"/>
-    </map:resource>
-  </map:resources>
--->
-  
   <map:pipelines>
 
     <!-- FIXME: the location of Lenya's cache should either be a global convention 
@@ -81,9 +47,6 @@
       </global-variables>
     </map:component-configurations>
 
-
-
-
     <!-- This pipeline handles helper requests and metadata, not the actual publication documents -->
     <map:pipeline>
 
@@ -110,21 +73,21 @@
         </map:select>
       </map:match>
  
-<!--
-   FIXME: the whole webdav shebang should be handled by the webdav module sitemap.
--->
-     <!-- catch webdav GET requests. -->
-        <map:match pattern="*/webdav**">
-          <map:mount uri-prefix="{1}/" src="{fallback:lenya/modules/webdav/sitemap.xmap}" check-reload="true" reload-method="synchron"/>    
-        </map:match>
+      <!--
+         FIXME: the whole webdav shebang should be handled by the webdav module sitemap.
+      -->
+      <!-- catch webdav GET requests. -->
+      <map:match pattern="*/webdav**">
+        <map:mount uri-prefix="{1}/" src="{fallback:lenya/modules/webdav/sitemap.xmap}" check-reload="true" reload-method="synchron"/>    
+      </map:match>
 
-        <!-- catch PUT requests (used by webdav clients) -->
-        <map:select type="request-method">
-          <!-- many client editors like to PUT changes -->
-          <map:when test="PUT">
-            <map:mount uri-prefix="" src="{fallback:lenya/modules/webdav/sitemap.xmap}" check-reload="true" reload-method="synchron"/>
-          </map:when>
-        </map:select>
+      <!-- catch PUT requests (used by webdav clients) -->
+      <map:select type="request-method">
+        <!-- many client editors like to PUT changes -->
+        <map:when test="PUT">
+          <map:mount uri-prefix="" src="{fallback:lenya/modules/webdav/sitemap.xmap}" check-reload="true" reload-method="synchron"/>
+        </map:when>
+      </map:select>
       
       <!-- FIXME: this should be merged with the getDoctypeXSLT/* matcher below. currently, it is necessary
            so that "getDoctypeXSLT/" requests do not get eaten by the **/ matcher below. 
@@ -156,7 +119,7 @@
         <map:generate src="{resource-type:format-rss}"/>
         <map:serialize type="xml"/>
       </map:match>
-      
+
       <!-- FIXME: either this should be moved into a metadata module, or at least we need to establish
            some standard for magic extra suffixes and stick to it.
            Here we use .html.meta, bxe uses .bxe.html.
@@ -169,7 +132,7 @@
         <map:generate type="lenyaMetaData" src="lenya-document:{request-param:uuid},lang={request-param:lang},pubid={request-param:pubid},area={request-param:area}"/>
         <map:serialize type="xml"/>
       </map:match>
-      
+
       <!-- {1:rendertype}/{2:pub}/{3:area}/{4:path} -->
       <map:match pattern="document-content/*/*/*/**">
         <map:act type="language-exists">
@@ -190,7 +153,7 @@
         </map:transform>
         <map:serialize type="xml"/>
       </map:match>
-      
+
       <!-- 
          This matcher aggregates the Lenya page: breadcrumbs, tabs, menu etc. and the actual document content.
          /lenyabody-raw-{1:rendertype}/{2:publication-id}/{3:area}/{4:doctype}/{5:default-language}/{6:language}/{7:path} 
@@ -227,7 +190,7 @@
       </map:match>
 
     </map:pipeline>
-        
+
     <!-- This is the pipeline that ultimately builds the page. -->
     <map:pipeline type="noncaching">
 
@@ -255,7 +218,7 @@
           <map:parameter name="author" value="{properties:pubs.default.author}"/>
           <map:parameter name="nodeName" value="{page-envelope:document-name}"/>
         </map:transform>
-        
+
        <!-- FIXME: why is the title handling inside a language-exists action? please document! -->  
         <map:act type="language-exists">
           <map:transform src="fallback://xslt/addXhtmlTitle.xsl">
@@ -265,16 +228,16 @@
 
         <!-- This is a demonstration of the generic meta data transformer
           described in bug 39891.
-          
+
           1) define the ns: xmlns:meta="http://apache.org/lenya/meta/1.0/"
           2) use it in above xsl like e.g.
           <meta:value ns="http://purl.org/dc/elements/1.1/" element="date" uuid="{@uuid}"/>
-          
+
           Where @ns is the namespace for which you want to retrieve the @element for.
           If there is more then one element registered then the transformer returns:
           <value xmlns="http://apache.org/lenya/meta/1.0/" value="2005-09-11 12:44:05" element="date" />
           <value xmlns="http://apache.org/lenya/meta/1.0/" value="2006-09-11 12:44:05" element="date" />
-          
+
           Otherwise it will return the value as characters.
         -->
         <map:transform type="metaData">
@@ -289,13 +252,13 @@
       </map:match>
 
     </map:pipeline>
-    
+
     <!-- This is the main entry point into the publication. This
     pipeline uses the uriparametrizer to determine the doctype of this
     request. It then aggregates the lenya menu (for the given area) and
     the lenya body, the actual document. -->
     <map:pipeline>
-      
+
       <!-- 
          FIXME: this is a BXE-specific hack that should be handled by BXE's module sitemap. The publication 
          should not be concerned with BXE-specific pre-processing of documents.
@@ -305,16 +268,16 @@
         <map:transform type="proxy"/>
         <map:serialize type="xml"/>
       </map:match>
-      
+
       <!-- 
         Finally: this matcher handles requests for publication documents. 
         /{1:area}/{2:document-path}.html
       -->
       <map:match pattern="*/**.html">
-        
         <!-- 
-          The default publication does not have content by default. This check provides the user with a dialog
-          to import example content. It's not needed for production systems.
+          The default publication does not have content by default. 
+          This check provides the user with a dialog to import example content. 
+          It should be removed in production systems.
         --> 
         <map:select type="resource-exists">
           <map:when test="lenya://lenya/pubs/{page-envelope:publication-id}/content/authoring/sitetree.xml"/>
@@ -342,11 +305,13 @@
         </map:select>          
       
         <!--
-           Lenya provides its own caching mechanism. There is a source writing transformer that will store rendered pages
-           in {global:cache-dir}. Hence we should first check for every request if a cached version already exists, before
-           starting the actual rendering process.
-           NOTE: the cache is disabled by default. That means it has seen very little testing. And it does not do proper cache
-           invalidation, so it's probably only useful as a quick performance hack on a mostly static site.
+           Lenya provides its own caching mechanism. There is a source writing transformer 
+           that will store rendered pages in {global:cache-dir}. Hence we should first check 
+           for every request if a cached version already exists, before starting the actual
+           rendering process.
+           NOTE: the cache is disabled by default. That means it has seen very little testing. 
+           And it does not do proper cache invalidation, so it's probably only useful as a quick
+           performance hack on a mostly static site.
         -->
         <!-- do we have this request in the cache? -->
         <map:select type="resource-exists">
@@ -357,8 +322,9 @@
           <!-- No. Generate the page and write it to the cache. -->
           <map:otherwise>
             <!-- 
-               FIXME: the "rendertype" parameter is a hack for BXE and should be handled by the bxe module. 
-               Moreover, it doesn't make much sense to cache documents in the authoring area that are about to be edited anyway.
+               FIXME: the "rendertype" parameter is a hack for BXE and should be handled by the 
+               bxe module. Moreover, it doesn't make much sense to cache documents in the authoring area
+               that are about to be edited anyway.
             -->
             <map:select type="parameter">
               <map:parameter name="parameter-selector-test" value="{request-param:rendertype}"/>
@@ -381,8 +347,7 @@
                   </map:when>
                   <map:otherwise>
                     <!-- for all other areas, we want a GUI menu (handled by global-sitemap.xmap -->
-                    <!-- FIXME: the ?doctype parameter doesn't seem to be used (see global-sitemap.xmap). -->
-                    <map:transform src="cocoon://lenya-page/{page-envelope:publication-id}/{1}/{2}.xml?doctype={page-envelope:document-type}"/>
+                    <map:transform src="cocoon://lenya-page/{page-envelope:publication-id}/{1}/{2}.xml"/>
                     <!-- 
                        external broken link reporting (pretty much untested) 
                        TODO: External Links checking should be optional on a document by document basis.
@@ -400,7 +365,6 @@
                    workaround to avoid empty script, style and textarea tags (firefox chokes on those)
                 -->
                 <map:transform src="fallback://lenya/xslt/util/strip_namespaces.xsl"/>
-
 
                 <!-- Cache writing -->
                 <map:select type="parameter">



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org