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/07/12 22:48:39 UTC

svn commit: r555754 - in /lenya/trunk/src/modules/xhtml: sitemap.xmap xslt/xhtml2xhtml.xsl

Author: andreas
Date: Thu Jul 12 13:48:38 2007
New Revision: 555754

URL: http://svn.apache.org/viewvc?view=rev&rev=555754
Log:
Use downloadLink format for asset link presentation (see bug 42878)

Modified:
    lenya/trunk/src/modules/xhtml/sitemap.xmap
    lenya/trunk/src/modules/xhtml/xslt/xhtml2xhtml.xsl

Modified: lenya/trunk/src/modules/xhtml/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/xhtml/sitemap.xmap?view=diff&rev=555754&r1=555753&r2=555754
==============================================================================
--- lenya/trunk/src/modules/xhtml/sitemap.xmap (original)
+++ lenya/trunk/src/modules/xhtml/sitemap.xmap Thu Jul 12 13:48:38 2007
@@ -95,6 +95,7 @@
           <map:parameter name="nodeid" value="{doc-info:{2}:{3}:{4}:{5}:nodeName}"/>
           <map:parameter name="language" value="{4}"/>
         </map:transform>
+        <map:transform type="cinclude"/>
         <map:serialize type="xml"/>
       </map:match>
 

Modified: lenya/trunk/src/modules/xhtml/xslt/xhtml2xhtml.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/xhtml/xslt/xhtml2xhtml.xsl?view=diff&rev=555754&r1=555753&r2=555754
==============================================================================
--- lenya/trunk/src/modules/xhtml/xslt/xhtml2xhtml.xsl (original)
+++ lenya/trunk/src/modules/xhtml/xslt/xhtml2xhtml.xsl Thu Jul 12 13:48:38 2007
@@ -24,6 +24,7 @@
     xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0" 
     xmlns="http://www.w3.org/1999/xhtml"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:ci="http://apache.org/cocoon/include/1.0" 
     exclude-result-prefixes="xhtml lenya"
     >
     
@@ -68,22 +69,7 @@
   </xsl:template>
 
  <xsl:template match="lenya:asset">
-   <xsl:variable name="extent">
-     <xsl:value-of select="@size"/>
-   </xsl:variable>
-   <xsl:variable name="suffix">
-     <xsl:call-template name="substring-after-last">
-       <xsl:with-param name="input" select="@src"/>
-       <xsl:with-param name="substr">.</xsl:with-param>
-     </xsl:call-template>
-   </xsl:variable>
-   <div class="asset">
-       <xsl:text>&#160;</xsl:text>
-       <a href="{@src}" title="{text()}">
-         <xsl:value-of select="text()"/>
-       </a>
-       (<xsl:value-of select="number($extent)"/>KB)
-   </div>
+   <ci:include src="{@src}?format=downloadLink"/>
  </xsl:template>
 
  <xsl:template match="dc:metadata"/>



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