[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Fwd: xslt:image resizing

Subject: RE: Fwd: xslt:image resizing
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 12 Mar 2009 10:16:09 -0000
RE:  Fwd: xslt:image resizing
Please show sample input and desired output of your transformation (ideally,
a complete example that people can run for themselves, but small enough to
be easily digested).

If something "doesn't work", then tell us what the symptoms are - error
message? wrong output? machine catches fire?

Also, tell us whether you are using XSLT 1.0 or 2.0.

For all we can tell, it's as simple as a spelling mistake (@heigth for
@height). But that's pure guesswork.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Plew [mailto:plew@xxxxxx] 
> Sent: 12 March 2009 01:08
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Fwd: xslt:image resizing
> 
> Hello
> 
> im looking for something like image resizeing, i tried with 
> this peace of code, but it wont work?
> 
> 
> <xsl:template match="*[local-name()='img']">
>    <br></br>
>    <img>
>        <xsl:attribute name="src">
>            <xsl:copy-of select="resolve-uri(@src,$url)"/>
>        </xsl:attribute>              <xsl:choose>                  
> <xsl:when test="@width > $width and @heigth &gt;= $height">
>                <xsl:attribute name="width">
>                    <xsl:value-of select="($width div @width) 
> * @width" />px
>                </xsl:attribute>
>                <xsl:attribute name="height">
>                    <xsl:value-of select="($width div @width) 
> * @heigth" 
> />px
>                </xsl:attribute>
>            </xsl:when>                      <xsl:when test="@height > 
> $height and @width &lt; $height">
>                <xsl:attribute name="width">
>                    <xsl:value-of select="($width div @height) 
> * @width" />
>                </xsl:attribute>
>                <xsl:attribute name="height">
>                    <xsl:value-of select="($height div @height) * 
> @height" />
>                </xsl:attribute>
>            </xsl:when>
>        </xsl:choose>
>    </img>
> </xsl:template>
> 
> greeting stefan

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.