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 2007/04/04 18:26:36 UTC

svn commit: r525551 - in /lenya/trunk/src/modules: collection/sitemap.xmap collection/xslt/collection2cinclude.xsl collection/xslt/sitetree2children.xsl news/sitemap.xmap

Author: andreas
Date: Wed Apr  4 09:26:31 2007
New Revision: 525551

URL: http://svn.apache.org/viewvc?view=rev&rev=525551
Log:
Filter news by language

Modified:
    lenya/trunk/src/modules/collection/sitemap.xmap
    lenya/trunk/src/modules/collection/xslt/collection2cinclude.xsl
    lenya/trunk/src/modules/collection/xslt/sitetree2children.xsl
    lenya/trunk/src/modules/news/sitemap.xmap

Modified: lenya/trunk/src/modules/collection/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/collection/sitemap.xmap?view=diff&rev=525551&r1=525550&r2=525551
==============================================================================
--- lenya/trunk/src/modules/collection/sitemap.xmap (original)
+++ lenya/trunk/src/modules/collection/sitemap.xmap Wed Apr  4 09:26:31 2007
@@ -24,8 +24,8 @@
 
     <map:pipeline>
 
-      <!-- collectionWithChildren/{uuid}.xml -->
-      <map:match pattern="collectionWithChildren/*.xml">
+      <!-- collectionWithChildren/{uuid}/{language}.xml -->
+      <map:match pattern="collectionWithChildren/*/*.xml">
         <map:generate type="sitetree-fragment">
           <map:parameter name="areas" value="{page-envelope:area}"/>
           <map:parameter name="area" value="{page-envelope:area}"/>
@@ -33,9 +33,12 @@
           <map:parameter name="initial" value="false"/>
           <map:parameter name="mimetype" value=""/>
         </map:generate>
-        <map:transform src="fallback://lenya/modules/collection/xslt/sitetree2children.xsl"/>
+        <map:transform src="fallback://lenya/modules/collection/xslt/sitetree2children.xsl">
+          <map:parameter name="language" value="{2}"/>
+        </map:transform>
         <map:transform src="fallback://lenya/modules/collection/xslt/collection2cinclude.xsl">
           <map:parameter name="uuid" value="{1}"/>
+          <map:parameter name="language" value="{2}"/>
         </map:transform>
         <map:transform type="cinclude"/>
         <map:serialize type="xml"/>

Modified: lenya/trunk/src/modules/collection/xslt/collection2cinclude.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/collection/xslt/collection2cinclude.xsl?view=diff&rev=525551&r1=525550&r2=525551
==============================================================================
--- lenya/trunk/src/modules/collection/xslt/collection2cinclude.xsl (original)
+++ lenya/trunk/src/modules/collection/xslt/collection2cinclude.xsl Wed Apr  4 09:26:31 2007
@@ -5,12 +5,13 @@
   
   
   <xsl:param name="uuid"/>
+  <xsl:param name="language"/>
   
   
   <xsl:template match="col:collection">
     <xsl:choose>
       <xsl:when test="@type = 'children'">
-        <ci:include src="cocoon://modules/collection/collectionWithChildren/{$uuid}.xml"/>
+        <ci:include src="cocoon://modules/collection/collectionWithChildren/{$uuid}/{$language}.xml"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:copy>

Modified: lenya/trunk/src/modules/collection/xslt/sitetree2children.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/collection/xslt/sitetree2children.xsl?view=diff&rev=525551&r1=525550&r2=525551
==============================================================================
--- lenya/trunk/src/modules/collection/xslt/sitetree2children.xsl (original)
+++ lenya/trunk/src/modules/collection/xslt/sitetree2children.xsl Wed Apr  4 09:26:31 2007
@@ -5,6 +5,9 @@
   xmlns:ci="http://apache.org/cocoon/include/1.0">
   
   
+  <xsl:param name="language"/>
+  
+  
   <xsl:template match="site:fragment">
     <col:collection>
       <xsl:apply-templates select="site:node"/>
@@ -13,7 +16,12 @@
   
   
   <xsl:template match="site:node">
-    <col:document uuid="{@uuid}"/>
+    <xsl:apply-templates select="site:label[lang($language)]"/>
+  </xsl:template>
+  
+  
+  <xsl:template match="site:label">
+    <col:document uuid="{../@uuid}"/>
   </xsl:template>
 
 </xsl:stylesheet>

Modified: lenya/trunk/src/modules/news/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/news/sitemap.xmap?view=diff&rev=525551&r1=525550&r2=525551
==============================================================================
--- lenya/trunk/src/modules/news/sitemap.xmap (original)
+++ lenya/trunk/src/modules/news/sitemap.xmap Wed Apr  4 09:26:31 2007
@@ -49,6 +49,7 @@
         <map:generate src="lenya-document:{4},pub={2},area={3},lang={5}{link:rev}"/>
         <map:transform src="fallback://lenya/modules/collection/xslt/collection2cinclude.xsl">
           <map:parameter name="uuid" value="{4}"/>
+          <map:parameter name="language" value="{5}"/>
         </map:transform>
         <map:transform type="cinclude"/>
         <map:transform src="fallback://lenya/modules/news/xslt/collection2{1}.xsl">



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