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

Re: Figure Problem using XSL-FO

Subject: Re: Figure Problem using XSL-FO
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 16 Oct 2006 09:46:17 -0400
figure problem
At 2006-10-16 14:10 +0100, David Carlisle wrote:
> I have one problem. I am creating XML to PDF. I want ignore second
> imageobject

just select the first, something like:

   <fo:block line-height="1.5"
xsl:use-attribute-sets="formal.object.properties" text-align="center">
 <fo:external-graphic src="@fileref">

Actually when using an attribute specification, it would need an attribute value template, and the use of url(), and I tell my students to use double quotes inside the attribute to protect from URI strings that validly have single quotes, so I would suggest:

<fo:external-graphic src="url(&quot;{@fileref}&quot;)"/>

  <xsl:attribute name="src">
                <xsl:apply-templates select="imagedata[@format='GIF' or
@format='JPG'][1]/@fileref"/>

There is no need for *both* the src= specification and the attribute instruction.

If you were to choose to use the instruction,
then it would be along the lines of:

  <xsl:attribute name="src">
    <xsl:text>url("</xsl:text>
    <xsl:apply-templates select="imagedata[@format='GIF' or
                                 @format='JPG'][1]/@fileref"/>
    <xsl:text>")</xsl:text>
  </xsl:attribute>

But it would be one or the other, and not both.

I hope this helps.

. . . . . . . . . . Ken




-- UBL/XSLT/XSL-FO training: Allerxd/Verx Denmark 2006-11-13,17,20/24 UBL International 2006 2006-11-13/17 http://www.ublconference.com World-wide corporate, govt. & user group UBL, XSL, & XML training. G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal

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.