You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Roges Grandi <ro...@intra.procergs.com.br> on 2000/10/26 19:38:31 UTC

How to take file names for graphics from XML?

One way to put images into documents  is simply to declare:

              <fo:external-graphic
                src="file:my-file.jpg"/>
            </fo:block>

Ok. But if I wish to take the file source name from the XML?

I'm trying to use a variable to capture the file name from XML, but src
attribute doesn't deal with variables. When I compile the following FOP returns
"ERROR while creating area : no protocol: $my-image"

 <xsl:variable name="my-image">
       <xsl:value-of select="logo"/>
</xsl:variable>

<fo:block>
    <fo:external-graphic  src="$logotipo"/>
</fo:block>

Roges



Re: How to take file names for graphics from XML?

Posted by Eric SCHAEFFER <es...@posterconseil.com>.
That's XSLT, not XSL....

Eric.

----- Original Message -----
From: "Roges Grandi" <ro...@intra.procergs.com.br>
To: <fo...@xml.apache.org>
Sent: Thursday, October 26, 2000 7:38 PM
Subject: How to take file names for graphics from XML?


> One way to put images into documents  is simply to declare:
>
>               <fo:external-graphic
>                 src="file:my-file.jpg"/>
>             </fo:block>
>
> Ok. But if I wish to take the file source name from the XML?
>
> I'm trying to use a variable to capture the file name from XML, but src
> attribute doesn't deal with variables. When I compile the following FOP
returns
> "ERROR while creating area : no protocol: $my-image"
>
>  <xsl:variable name="my-image">
>        <xsl:value-of select="logo"/>
> </xsl:variable>
>
> <fo:block>
>     <fo:external-graphic  src="$logotipo"/>
> </fo:block>
>
> Roges
>
>