getting an external-graphic from xml in pdf

2001-07-19 Thread FLBAUMGARTEN

The external-graphic fo works if it´s in the fo-file.
Now my problem goes a little further.

The picture is embedded in the xml file like this:

PICTURE source=Bilder/formula.gif /

To show this in a browser my xsl-file looks like this and it works:

xsl:template match=//PICTURE
DIV align=center
IMG BORDER=0
xsl:attribute name=src
xsl:value-of select=//PICTURE/@source/
/xsl:attribute
/IMG
/DIV
/xsl:template

But what do I do to make the transformation to pdf with fo possible since the 
recommendation says to use

src:file:... like this

The file formula.gif is only embedded in the xml file and should not just be in the 
xsl file.

Now I want to add the attribute which would be no problem without the file: thing.
It should look somehow like this, but I don´t know how to add this in the quotation 
marks.

xsl:template match=//PICTURE
 fo:block
  fo:external-graphic text-align=center
   xsl:attribute name=src
xsl:value-of select=//PICTURE/@source/
   /xsl:attribute
  /fo:external-graphic
 /fo:block
/xsl:template

This of course doesn´t work.

Can somebody help me with this??

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




Re: getting an external-graphic from xml in pdf

2001-07-19 Thread Thieler Jens

I suppose this question to be OT even in fop-user.
Anyhow, study the appended code
and above all study some XSLT tutorials.

?xml version=1.0?
xsl:stylesheet version=1.0
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 xmlns:fo=http://www.w3.org/1999/XSL/Format;
  xsl:template match=/
fo:root
  xsl:apply-templates /
/fo:root
  /xsl:template
  
  xsl:template match=//PICTURE
fo:block
  fo:external-graphic
xsl:attribute name=src
  xsl:textfile:/xsl:text
  xsl:value-of select=@source /
/xsl:attribute
  /fo:external-graphic
/fo:block
  /xsl:template

  xsl:template match=//PUNCTURE
xsl:variable name=source
  xsl:value-of select=@source /
/xsl:variable
fo:block
  fo:external-graphic src=file:{$source} /
/fo:block
  /xsl:template
/xsl:stylesheet

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Gesendet am: Donnerstag, 19. Juli 2001 16:19
An: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]

...

But what do I do to make the transformation to pdf with fo possible since
the recommendation says to use 

src:file:... like this  

The file formula.gif is only embedded in the xml file and should not just
be in the xsl file.

Now I want to add the attribute which would be no problem without the
file: thing.
It should look somehow like this, but I don´t know how to add this in the
quotation marks.

xsl:template match=//PICTURE
 fo:block
  fo:external-graphic text-align=center
   xsl:attribute name=src
xsl:value-of select=//PICTURE/@source/
   /xsl:attribute
  /fo:external-graphic
 /fo:block 
/xsl:template

This of course doesn´t work.

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