xsl-list
[Top] [All Lists]

Re: [xsl] Figure Problem using XSL-FO

2006-10-16 06:47:33
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;{(_at_)fileref}&quot;)"/>

  <xsl:attribute name="src">
                <xsl:apply-templates select="imagedata[(_at_)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[(_at_)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: Allerød/Vårø 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(_at_)CraneSoftwrights(_dot_)com
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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>