You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2008/03/30 00:57:46 UTC

svn commit: r642647 - in /lenya/trunk/src/modules/collection: sitemap.xmap xslt/collection2include.xsl xslt/prepareInclude.xsl

Author: andreas
Date: Sat Mar 29 16:57:44 2008
New Revision: 642647

URL: http://svn.apache.org/viewvc?rev=642647&view=rev
Log:
Adding format handling to collection module.

Modified:
    lenya/trunk/src/modules/collection/sitemap.xmap
    lenya/trunk/src/modules/collection/xslt/collection2include.xsl
    lenya/trunk/src/modules/collection/xslt/prepareInclude.xsl

Modified: lenya/trunk/src/modules/collection/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/collection/sitemap.xmap?rev=642647&r1=642646&r2=642647&view=diff
==============================================================================
--- lenya/trunk/src/modules/collection/sitemap.xmap (original)
+++ lenya/trunk/src/modules/collection/sitemap.xmap Sat Mar 29 16:57:44 2008
@@ -16,8 +16,6 @@
   limitations under the License.
 -->
 
-<!-- $Id: doctypes.xmap 179488 2005-06-02 02:29:39Z gregor $ -->
-
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
   <map:pipelines>
@@ -44,12 +42,6 @@
           -->
           <map:parameter name="defaultLanguage" value="en"/>
         </map:transform>
-        <map:serialize type="xml"/>
-      </map:match>
-      
-      <!-- metadata/{1:pub}/{2:area}{3:uuid}/{4:language}.xml -->
-      <map:match pattern="metadata/*/*/*/*.xml">
-        <map:generate type="lenyaMetaData" src="lenya-document:{3},pub={1},area={2},lang={4}"/>
         <map:serialize type="xml"/>
       </map:match>
       

Modified: lenya/trunk/src/modules/collection/xslt/collection2include.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/collection/xslt/collection2include.xsl?rev=642647&r1=642646&r2=642647&view=diff
==============================================================================
--- lenya/trunk/src/modules/collection/xslt/collection2include.xsl (original)
+++ lenya/trunk/src/modules/collection/xslt/collection2include.xsl Sat Mar 29 16:57:44 2008
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
   xmlns:col="http://apache.org/cocoon/lenya/collection/1.0"
   xmlns:ci="http://apache.org/cocoon/include/1.0">
@@ -8,12 +24,12 @@
   <xsl:param name="area"/>
   <xsl:param name="uuid"/>
   <xsl:param name="language"/>
+  <xsl:param name="format"/>
   
   
   <xsl:template match="/col:collection">
     <xsl:copy>
       <xsl:copy-of select="@*"/>
-      <ci:include src="cocoon://modules/collection/metadata/{$pub}/{$area}/{$uuid}/{$language}.xml"/>
       <xsl:apply-templates select="*"/>
     </xsl:copy>
   </xsl:template>
@@ -28,8 +44,7 @@
     <xsl:copy>
       <xsl:copy-of select="@*"/>
       <xsl:if test="not(*)">
-        <ci:include src="cocoon://modules/collection/metadata/{$pub}/{$area}/{@uuid}/{@xml:lang}.xml"/>
-        <ci:include src="lenya-document:{@uuid},pub={$pub},area={$area},lang={@xml:lang}?format=xhtml"/>
+        <ci:include src="lenya-document:{@uuid},pub={$pub},area={$area},lang={@xml:lang}?format={$format}"/>
       </xsl:if>
       <xsl:copy-of select="*"/>
     </xsl:copy>

Modified: lenya/trunk/src/modules/collection/xslt/prepareInclude.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/collection/xslt/prepareInclude.xsl?rev=642647&r1=642646&r2=642647&view=diff
==============================================================================
--- lenya/trunk/src/modules/collection/xslt/prepareInclude.xsl (original)
+++ lenya/trunk/src/modules/collection/xslt/prepareInclude.xsl Sat Mar 29 16:57:44 2008
@@ -1,12 +1,30 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
   xmlns:col="http://apache.org/cocoon/lenya/collection/1.0"
-  xmlns:i="http://apache.org/cocoon/include/1.0">
+  xmlns:i="http://apache.org/cocoon/include/1.0"
+  xmlns:xhtml="http://www.w3.org/1999/xhtml">
   
   <xsl:param name="pub"/>
   <xsl:param name="area"/>
   <xsl:param name="uuid"/>
   <xsl:param name="language"/>
+  <xsl:param name="format"/>
   
   <xsl:template match="col:collection">
     <xsl:copy>
@@ -22,7 +40,9 @@
           <i:include src="cocoon://modules/collection/collectionWithChildren/{$allLanguages}/{$pub}/{$area}/{$uuid}/{$language}.xml"/>
         </xsl:when>
         <xsl:when test="@type = 'link'">
-          <i:include src="{@href}"/>
+          <i:include src="{@href}">
+            <i:parameter name="format" value="{$format}"/>
+          </i:include>
         </xsl:when>
         <xsl:otherwise>
           <xsl:copy-of select="col:document"/>



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