Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

svn commit: r532267 - in /lenya/trunk/src/modules/svg: config/module.xml xs: msg#00171

cms.lenya.cvs

Subject: svn commit: r532267 - in /lenya/trunk/src/modules/svg: config/module.xml xslt/image2svg.xsl

Author: nettings
Date: Wed Apr 25 01:53:20 2007
New Revision: 532267

URL: http://svn.apache.org/viewvc?view=rev&rev=532267
Log:
added check for existing query string to avoid duplicate parameters and
an invalid uri. this fixes bug
http://issues.apache.org/bugzilla/show_bug.cgi?id=42229

Modified:
lenya/trunk/src/modules/svg/config/module.xml
lenya/trunk/src/modules/svg/xslt/image2svg.xsl

Modified: lenya/trunk/src/modules/svg/config/module.xml
URL:
http://svn.apache.org/viewvc/lenya/trunk/src/modules/svg/config/module.xml?view=diff&rev=532267&r1=532266&r2=532267
==============================================================================
--- lenya/trunk/src/modules/svg/config/module.xml (original)
+++ lenya/trunk/src/modules/svg/config/module.xml Wed Apr 25 01:53:20 2007
@@ -22,7 +22,9 @@
<id>org.apache.lenya.modules.svg</id>
<package>org.apache.lenya.modules</package>
<version>0.1-dev</version>
- <name>SVG</name>
+ <name>SVG image rendering</name>
<lenya-version>@lenya.version@</lenya-version>
- <description>SVG-based image rendering</description>
+ <description>The SVG module generates the rounded corners for
+ the Lenya dialogs, and re-scales pixel-based GIF, JPG and PNG images on the
+ fly, depending on height and width query parameters. It uses
Batik.</description>
</module>

Modified: lenya/trunk/src/modules/svg/xslt/image2svg.xsl
URL:
http://svn.apache.org/viewvc/lenya/trunk/src/modules/svg/xslt/image2svg.xsl?view=diff&rev=532267&r1=532266&r2=532267
==============================================================================
--- lenya/trunk/src/modules/svg/xslt/image2svg.xsl (original)
+++ lenya/trunk/src/modules/svg/xslt/image2svg.xsl Wed Apr 25 01:53:20 2007
@@ -21,7 +21,18 @@

<xsl:template match="xhtml:img[@height and @width]/@src">
<xsl:attribute name="src">
- <xsl:value-of select="."/>
+ <!-- if the src attribute already contains a querystring, cut it off.
otherwise, multiple
+ querystrings can accumulate!
+ NB: substring-before returns the empty string if the needle is not
found.
+ -->
+ <xsl:choose>
+ <xsl:when test="contains(.,'?')">
+ <xsl:value-of select="substring-before(.,'?')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:text>?</xsl:text>
<xsl:text>lenya.module=svg&amp;</xsl:text>
<xsl:if test="string(../@height)">


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qplus.devel/200...    network.jabber....    debian.qa-packa...    encryption.gpg....    python.dabo.dev...    uclinux.devel/2...    science.mathema...    recreation.pesc...    kernel.ck/2004-...    mozilla.devel.e...    tex.latex.prosp...    ietf.multi6/200...    bbc.cvs/2002-11...    xfree86.newbie/...    jakarta.taglibs...    altlinux.hardwa...    comedi/2002-05/...    horde.bugs/2004...    games.diplomacy...    finance.e-gold....    web.dom.test-su...    lang.ruby.rails...    os.netbsd.devel...    video.gstreamer...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation