You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by gr...@apache.org on 2004/03/21 16:57:32 UTC

cvs commit: cocoon-lenya/src/webapp/lenya/pubs/default/xslt xhtml2xhtml.xsl

gregor      2004/03/21 07:57:32

  Modified:    src/webapp/lenya/pubs/default/xslt xhtml2xhtml.xsl
  Log:
  calculate size for an asset correctly. thanks to trapo.
  
  we will have to revisit this once we tackle #26576
  
  Revision  Changes    Path
  1.9       +19 -19    cocoon-lenya/src/webapp/lenya/pubs/default/xslt/xhtml2xhtml.xsl
  
  Index: xhtml2xhtml.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/pubs/default/xslt/xhtml2xhtml.xsl,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- xhtml2xhtml.xsl	13 Mar 2004 12:42:16 -0000	1.8
  +++ xhtml2xhtml.xsl	21 Mar 2004 15:57:32 -0000	1.9
  @@ -61,24 +61,24 @@
       </xsl:choose>
     </xsl:template>
   
  -  <xsl:template match="lenya:asset">
  -    <xsl:variable name="extent">
  -      <xsl:value-of select="dc:metadata/dc:extent"/>
  -    </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="{$nodeid}/{@src}">
  -          <xsl:value-of select="text()"/>
  -        </a>
  -        (<xsl:value-of select="format-number($extent div 1024, '#.#')"/>KB)
  -    </div>
  -  </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="{$nodeid}/{@src}">
  +         <xsl:value-of select="text()"/>
  +       </a>
  +       (<xsl:value-of select="number($extent)"/>KB)
  +   </div>
  + </xsl:template>
     
       <xsl:template match="xhtml:object" priority="3">
        <xsl:choose>
  
  
  

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