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 22:18:11 UTC

svn commit: r642809 - in /lenya/trunk/src/modules: collection/xslt/prepareInclude.xsl news/xslt/collection2include.xsl news/xslt/collection2xhtml.xsl

Author: andreas
Date: Sun Mar 30 13:18:10 2008
New Revision: 642809

URL: http://svn.apache.org/viewvc?rev=642809&view=rev
Log:
Improved recursive news inclusion re. RSS generation.

Modified:
    lenya/trunk/src/modules/collection/xslt/prepareInclude.xsl
    lenya/trunk/src/modules/news/xslt/collection2include.xsl
    lenya/trunk/src/modules/news/xslt/collection2xhtml.xsl

Modified: lenya/trunk/src/modules/collection/xslt/prepareInclude.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/collection/xslt/prepareInclude.xsl?rev=642809&r1=642808&r2=642809&view=diff
==============================================================================
--- lenya/trunk/src/modules/collection/xslt/prepareInclude.xsl (original)
+++ lenya/trunk/src/modules/collection/xslt/prepareInclude.xsl Sun Mar 30 13:18:10 2008
@@ -29,6 +29,12 @@
   <xsl:template match="col:collection">
     <xsl:copy>
       <xsl:copy-of select="@*"/>
+      <xsl:if test="not(@uuid)">
+        <xsl:attribute name="uuid"><xsl:value-of select="$uuid"/></xsl:attribute>
+      </xsl:if>
+      <xsl:if test="not(@language)">
+        <xsl:attribute name="xml:lang"><xsl:value-of select="$language"/></xsl:attribute>
+      </xsl:if>
       <xsl:choose>
         <xsl:when test="@type = 'children'">
           <xsl:variable name="allLanguages">
@@ -37,10 +43,10 @@
               <xsl:otherwise>false</xsl:otherwise>
             </xsl:choose>
           </xsl:variable>
-          <i:include src="cocoon://modules/collection/collectionWithChildren/{$allLanguages}/{$pub}/{$area}/{$uuid}/{$language}.xml"/>
+          <i:include src="cocoon://modules/collection/collectionWithChildren/{$allLanguages}/{$pub}/{$area}/{$uuid}/{$language}.xml" strip-root="true"/>
         </xsl:when>
         <xsl:when test="@type = 'link'">
-          <i:include src="{@href}">
+          <i:include src="{@href}" strip-root="true">
             <i:parameter name="format" value="{$format}"/>
           </i:include>
         </xsl:when>

Modified: lenya/trunk/src/modules/news/xslt/collection2include.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/news/xslt/collection2include.xsl?rev=642809&r1=642808&r2=642809&view=diff
==============================================================================
--- lenya/trunk/src/modules/news/xslt/collection2include.xsl (original)
+++ lenya/trunk/src/modules/news/xslt/collection2include.xsl Sun Mar 30 13:18:10 2008
@@ -39,6 +39,9 @@
   
   <xsl:template match="/col:collection">
     <div id="news">
+      <div class="rsslink">
+        <a type="application/rss+xml" href="lenya-document:{$uuid},pub={$pub},area={$area},lang={$language}?uuid2url.extension=rss">RSS 2.0</a>
+      </div>
       <h1><meta:value element="title" ns="http://purl.org/dc/elements/1.1/"
         uuid="{$uuid}" lang="{$language}"/></h1>
       <xsl:for-each select="col:document">

Modified: lenya/trunk/src/modules/news/xslt/collection2xhtml.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/news/xslt/collection2xhtml.xsl?rev=642809&r1=642808&r2=642809&view=diff
==============================================================================
--- lenya/trunk/src/modules/news/xslt/collection2xhtml.xsl (original)
+++ lenya/trunk/src/modules/news/xslt/collection2xhtml.xsl Sun Mar 30 13:18:10 2008
@@ -47,10 +47,11 @@
     <html>
       <body>
         <div id="body">
-          <div class="rsslink">
-            <a type="application/rss+xml" href="lenya-document:{$uuid},pub={$pub},area={$area},lang={$language}?uuid2url.extension=rss">RSS 2.0</a>
-          </div>
-          <h1><meta:value ns="http://purl.org/dc/elements/1.1/" element="title"
+          <h1>
+            <div class="rsslink">
+              <a type="application/rss+xml" href="lenya-document:{$uuid},pub={$pub},area={$area},lang={$language}?uuid2url.extension=rss">RSS 2.0</a>
+            </div>
+            <meta:value ns="http://purl.org/dc/elements/1.1/" element="title"
             uuid="{$uuid}" lang="{$language}"/></h1>
           
           <xsl:if test="$area = 'authoring'">



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