On Oct 5, 2008, at 14:05, danyolgiax wrote:

Hi


Hi all I've this xml with an embedded image:

 <Immagini>
    <FileBean>
      <FileRawData>/9j/4AAQSkZJRgABAQEASABIAAD/2wBDA...

I'm trying to display it with something like this without results:

<fo:block>
 <fo:instream-foreign-object>

<xsl:value-of select="Immagini/FileBean/ FileRawData"/>

        </fo:instream-foreign-object>
</fo:block>

can u help me?

This approach fails because the 'foreign' content is not XML.

If I interpret correctly, what you are looking for is an fo:external- graphic with a 'data:' URL as its source.

Depending on the actual format of the image file, something like:

<fo:block>
  <fo:external-graphic>
    <xsl:attribute name="src">
<xsl:value-of select="concat('data:image/png;base64,', Immagini/FileBean/FileRawData)" />
    </xsl:attribute>
  </fo:external-graphic>
</fo:block>

FOP offers support for the data URI scheme out-of-the-box.

HTH!

Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to