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/13 17:45:07 UTC
svn commit: r528530 -
/lenya/trunk/src/modules/languageselector/xslt/resizesvg.xsl
Author: andreas
Date: Fri Apr 13 08:45:06 2007
New Revision: 528530
URL: http://svn.apache.org/viewvc?view=rev&rev=528530
Log:
[minor change] XSLT code simplification
Modified:
lenya/trunk/src/modules/languageselector/xslt/resizesvg.xsl
Modified: lenya/trunk/src/modules/languageselector/xslt/resizesvg.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/languageselector/xslt/resizesvg.xsl?view=diff&rev=528530&r1=528529&r2=528530
==============================================================================
--- lenya/trunk/src/modules/languageselector/xslt/resizesvg.xsl (original)
+++ lenya/trunk/src/modules/languageselector/xslt/resizesvg.xsl Fri Apr 13 08:45:06 2007
@@ -36,15 +36,14 @@
<xsl:template match="/svg:svg">
<xsl:choose>
<xsl:when test="number($height) > 0 and number($height) <= $maxHeight">
- <svg:svg>
+ <svg:svg viewBox="0 0 {@width} {@height}">
<xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute>
<xsl:if test="number(@width) > 0 and number(@height) > 0">
<xsl:attribute name="width"><xsl:value-of select="ceiling(@width div @height * $height)"/></xsl:attribute>
</xsl:if>
- <xsl:attribute name="viewBox"><xsl:value-of select="concat('0 0 ', @width, ' ', @height)"/></xsl:attribute>
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
- </xsl:copy>
+ </xsl:copy>
</svg:svg>
</xsl:when>
<xsl:otherwise>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org