RE: [xep-support] Scaling of images

From: Daragh Pender <Daragh.Pender@fastsearch.com>
Date: Tue Oct 16 2007 - 23:42:54 PDT

I seem to have found a solution with:

<fo:external-graphic src="url({$href})" content-width="scale-to-fit"
content-height="100%" width="100%" scaling="uniform"/>

it is very particular about quotes and/or double-quotes !!

...there is probably a better way of implementing this - but I can find
very little instruction available on the web.

/Daragh

-----Original Message-----
From: owner-xep-support@renderx.com
[mailto:owner-xep-support@renderx.com] On Behalf Of G. Ken Holman
Sent: Wednesday, 17 October 2007 3:53 PM
To: xep-support@renderx.com
Subject: Re: [xep-support] Scaling of images

At 2007-10-16 22:19 -0400, Daragh Pender wrote:
>Hi - I am trying to implement the image scaling customization as
>described at
><http://www.renderx.com/usecasestest.html>http://www.renderx.com/usecas
>estest.html
>
>I have cut and pasted the code below into my ...
>\Customization\fo\xsl\custom.xsl file
><xsl:template match="image">
> <fo:block line-height="1pt">
> <fo:external-graphic content-width="scale-to-fit"
> content-height="100%" width="100%" scaling="uniform">
> <xsl:attribute name="src">url(<xsl:value-of select="@src"/>)
></xsl:attribute> </fo:external-graphic> </fo:block> </xsl:template>
>
>However, when I build it fails to find any of the graphics.....in the
>fo file I get this for the source of the graphic: src="url()&#xA;"

The &#xA; is coming from the fact you have a new-line in the stylesheet
text node for the attribute. Otherwise, it looks like your <image>
element doesn't have a src= attribute. Have you spelled it correctly?
Can you post a excerpt of your XML and the XSL-FO created for that XML?

>What am I missing here ? - how do I tell it to keep the original src
>value for each graphic and just change the other attributes ?

Right ... but nothing is obviously wrong. If you wanted to make things
more succinct you could have used an attribute value template:

<fo:external-graphic content-width="scale-to-fit" content-height="100%"
                      width="100%" scaling="uniform"
                      src='url("{@src}")'/>

But other than that it looks fine to me (though I am bleary eyed in the
middle of the morning). I suspect you have a typo.

. . . . . . . . . . . Ken

--
Comprehensive in-depth XSLT2/XSL-FO1.1 classes: Austin TX,Jan-2008
World-wide corporate, govt. & user group XML, XSL and UBL training
RSS feeds:     publicly-available developer resources and training
G. Ken Holman                 mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/f/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Cancer Awareness Jul'07  http://www.CraneSoftwrights.com/f/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address you
are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service
http://www.renderx.com/terms-of-service.html
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Wed Oct 17 00:12:07 2007

This archive was generated by hypermail 2.1.8 : Wed Oct 17 2007 - 00:12:12 PDT