You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Christoph Brunner <ne...@yahoo.de> on 2003/10/30 15:56:54 UTC

reference a svg definition inside a .fo file

Hi fop user,

i define a svg graphic in my .fo file with the
following code:

<fo:block>
<fo:instream-foreign-object>
<svg:svg width="21.182cm" height="29.700cm"
xmlns:svg="http://www.w3.org/2000/svg">
<svg:rect x="0.90cm" y="0.780cm" width="8.050cm"
height="0.400cm" fill="#FFFFFF" stroke="#FF6666"
stroke-width="0.5px"/>
</svg:svg>
</fo:instream-foreign-object>
</fo:block>


Now i want to use this svg graphic on several places.
Is it possible to reference the svg definition any
time in the .fo file, without using
<fo:external-graphic>?
I want to define the graphic in the .fo file and not
outside!

Thanks
Christoph Brunner


__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Logos und Klingeltöne fürs Handy bei http://sms.yahoo.de

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: reference a svg definition inside a .fo file

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Christoph Brunner wrote:
> Now i want to use this svg graphic on several places.
> Is it possible to reference the svg definition any
> time in the .fo file, without using
> <fo:external-graphic>?

There are no references within the FO doc itself.

Another possiblity to get multiple copies from a master in an
XSLT file is cloning a variable:
  <xsl:variable name="mysvg">
   <svg:svg width="21.182cm" height="29.700cm"
     xmlns:svg="http://www.w3.org/2000/svg">
      <svg:rect x="0.90cm" y="0.780cm" width="8.050cm"
       height="0.400cm" fill="#FFFFFF" stroke="#FF6666"
       stroke-width="0.5px"/>
   </svg:svg>
  </xsl:variable

  ...
   <fo:instream-foreign-object>
     <xsl:copy-of select="$mysvg"/>
   </fo:instream-foreign-object>

> I want to define the graphic in the .fo file and not
> outside!
Why?

J.Pietschmann



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org