cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r406991 - in /cocoon/trunk/core/cocoon-webapp/src/main/webapp: apps/group2samples.xsl apps/sitemap.xmap welcome.xml
Date Tue, 16 May 2006 17:09:44 GMT
Author: reinhard
Date: Tue May 16 10:09:44 2006
New Revision: 406991

URL: http://svn.apache.org/viewcvs?rev=406991&view=rev
Log:
add links to all deployed blocks; add a link from the welcome page to the page listing all
blocks

Added:
    cocoon/trunk/core/cocoon-webapp/src/main/webapp/apps/group2samples.xsl   (with props)
Modified:
    cocoon/trunk/core/cocoon-webapp/src/main/webapp/apps/sitemap.xmap
    cocoon/trunk/core/cocoon-webapp/src/main/webapp/welcome.xml

Added: cocoon/trunk/core/cocoon-webapp/src/main/webapp/apps/group2samples.xsl
URL: http://svn.apache.org/viewcvs/cocoon/trunk/core/cocoon-webapp/src/main/webapp/apps/group2samples.xsl?rev=406991&view=auto
==============================================================================
--- cocoon/trunk/core/cocoon-webapp/src/main/webapp/apps/group2samples.xsl (added)
+++ cocoon/trunk/core/cocoon-webapp/src/main/webapp/apps/group2samples.xsl Tue May 16 10:09:44
2006
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2006 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.
+-->
+
+<!--+
+    | Convert the output of the directory generator into a samples file.
+    |
+    | $Id$
+    +-->
+
+<xsl:stylesheet version="1.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:dir="http://apache.org/cocoon/directory/2.0">
+
+  <xsl:template match="/">
+    <samples name="Cocoon Blocks">
+      <xsl:apply-templates/>
+    </samples>    
+  </xsl:template>
+  
+  <xsl:template match="group">
+    <xsl:copy>
+      <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
+      <xsl:apply-templates/>
+    </xsl:copy>
+  </xsl:template>
+  
+  <xsl:template match="sample">
+    <sample href="{../../../../@name}/" name="{@name}">
+      <xsl:copy-of select="*|text()"/>
+    </sample>
+  </xsl:template>
+  
+  <xsl:template match="*|@*|node()" priority="-2">
+     <xsl:apply-templates select="@*|node()"/>
+  </xsl:template>
+  
+</xsl:stylesheet>

Propchange: cocoon/trunk/core/cocoon-webapp/src/main/webapp/apps/group2samples.xsl
------------------------------------------------------------------------------
    eol:keywords = 'Id'

Propchange: cocoon/trunk/core/cocoon-webapp/src/main/webapp/apps/group2samples.xsl
------------------------------------------------------------------------------
    eol:style = 'native'

Modified: cocoon/trunk/core/cocoon-webapp/src/main/webapp/apps/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/trunk/core/cocoon-webapp/src/main/webapp/apps/sitemap.xmap?rev=406991&r1=406990&r2=406991&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-webapp/src/main/webapp/apps/sitemap.xmap (original)
+++ cocoon/trunk/core/cocoon-webapp/src/main/webapp/apps/sitemap.xmap Tue May 16 10:09:44
2006
@@ -21,5 +21,19 @@
         <map:mount uri-prefix="{1}" src="{1}/"/>
       </map:match>
     </map:pipeline>
+    <map:pipeline>
+      <map:match pattern="">
+        <map:generate type="xpathdirectory" src="./"> 
+          <map:parameter name="xpath" value="/xsamples/group"/> 
+          <map:parameter name="depth" value="2"/>
+          <map:parameter name="xmlFiles" value="\.xsamples$"/> 
+        </map:generate> 
+        <map:transform src="group2samples.xsl"/>
+        <map:transform src="context://samples/common/style/xsl/html/simple-samples2html.xsl">
+          <map:parameter name="contextPath" value="{request:contextPath}"/>
+        </map:transform>
+        <map:serialize type="html"/>        
+      </map:match>
+    </map:pipeline>
   </map:pipelines>
 </map:sitemap>

Modified: cocoon/trunk/core/cocoon-webapp/src/main/webapp/welcome.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/core/cocoon-webapp/src/main/webapp/welcome.xml?rev=406991&r1=406990&r2=406991&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-webapp/src/main/webapp/welcome.xml (original)
+++ cocoon/trunk/core/cocoon-webapp/src/main/webapp/welcome.xml Tue May 16 10:09:44 2006
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <!--
-  Copyright 1999-2004 The Apache Software Foundation
+  Copyright 1999-2006 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.
@@ -19,12 +19,14 @@
     | This is a very simple XML page done just to show how a simple 
     | cocoon pipeline works.
     |
-    | CVS $Id: welcome.xml,v 1.5 2004/04/05 12:25:35 antonio Exp $
+    | $Id$
     +-->
-
 <welcome>
- <message>
-   Congratulations! If you are reading this page, it means that
-   your Apache Cocoon installation was successful.
- </message>
+  <message>
+    Congratulations! If you are reading this page, it means that
+    your Apache Cocoon installation was successful.
+  </message>
+  <message>
+    To know more about Cocoon capabilities, look at the <link href="apps/">sample blocks</link>.
   
+  </message>
 </welcome>



Mime
View raw message