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 Selber Jean-François <jf...@oxymel.com> on 2004/05/07 17:54:49 UTC

embeded svg with
Hello

I want to embed a svg in my fo code
but this svg has an image and it doesn't work

can someone help me? (see fop code)
thanks 
jf

fop code:
<fo:instream-foreign-object>
     <svg:svg xmlns:svg="http://www.w3.org/2000/svg" width="3.1cm" height="3.6cm">

 <svg:rect x="0" y="0" width="3cm" height="3.5cm" fill="black"></svg:rect>
 <svg:rect x="0.1cm" y="0.1cm" width="3cm" height="3.5cm" fill="black"></svg:rect>
 <svg:image x="1" y="1" width="2.9cm" height="3.4cm" xlink:href="file://C:\photo.jpg"/>

</svg:svg>

    </fo:instream-foreign-object>

error:
[Fatal Error] :162:122: The prefix "xlink" for attribute "xlink:href" is not bound.
FATAL ERROR: The prefix "xlink" for attribute "xlink:href" is not bound.

Re: embeded svg with Posted by Clay Leeds <cl...@medata.com>.
Selber Jean-François wrote:

> fop code:
> <fo:instream-foreign-object>
>      <svg:svg xmlns:svg="http://www.w3.org/2000/svg" width="3.1cm" height="3.6cm">
> 
>  <svg:rect x="0" y="0" width="3cm" height="3.5cm" fill="black"></svg:rect>
>  <svg:rect x="0.1cm" y="0.1cm" width="3cm" height="3.5cm" fill="black"></svg:rect>
>  <svg:image x="1" y="1" width="2.9cm" height="3.4cm" xlink:href="file://C:\photo.jpg"/>
> 
> </svg:svg>
> 
>     </fo:instream-foreign-object>
> 
> error:
> [Fatal Error] :162:122: The prefix "xlink" for attribute "xlink:href" is not bound.
> FATAL ERROR: The prefix "xlink" for attribute "xlink:href" is not bound.

This is just a guess (I haven't actually used SVG in my FO files yet!), 
but perhaps it's having problems with the path? Try putting the .jpg 
file locally to the FO file. If you're combining an input XML & XSL file 
fop.bat -xml input.xml -xsl input.xsl -awt (or whatever output), the 
photo.jpg needs to be relative to the XML file.

Hope this helps!

Web Maestro Clay

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


RE: embeded svg with Posted by Chris Pratt <ch...@planetpratt.com>.
You have to define the xlink namespace or the parser doesn’t know what that
namespace refers to.  You define it just like you defined the svg namespace,
so your svg:svg line should probably be:

 

<svg:svg width=”3.1cm” height=”3.6cm” xmlns:svg=”http://www.w3.org/2000/svg”
xmlns:xlink=”http://www.w3.org/1999/xlink”>

 

  (*Chris*)

 

  _____  

From: Selber Jean-François [mailto:jfselber@oxymel.com] 
Sent: Friday, May 07, 2004 8:55 am
To: fop-user@xml.apache.org
Subject: embeded svg with <svg:image problem

 

Hello

 

I want to embed a svg in my fo code

but this svg has an image and it doesn't work

 

can someone help me? (see fop code)

thanks 

jf

 

fop code:

<fo:instream-foreign-object>
     <svg:svg xmlns:svg="http://www.w3.org/2000/svg" width="3.1cm"
height="3.6cm">

 

 <svg:rect x="0" y="0" width="3cm" height="3.5cm" fill="black"></svg:rect>
 <svg:rect x="0.1cm" y="0.1cm" width="3cm" height="3.5cm"
fill="black"></svg:rect>
 <svg:image x="1" y="1" width="2.9cm" height="3.4cm"
xlink:href="file://C:\photo.jpg <file:///C:\photo.jpg> "/>

 

</svg:svg>

 

    </fo:instream-foreign-object>

 

error:
[Fatal Error] :162:122: The prefix "xlink" for attribute "xlink:href" is not
bound.
FATAL ERROR: The prefix "xlink" for attribute "xlink:href" is not bound.


RE: embeded svg with Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Selber Jean-François [mailto:jfselber@oxymel.com]
>
> I want to embed a svg in my fo code
> but this svg has an image and it doesn't work
>
> can someone help me? (see fop code)

> FATAL ERROR: The prefix "xlink" for attribute
> "xlink:href" is not bound.

Hi,

Namespace issue...

You need to specify the following on your SVG element:

xmlns:xlink="http://www.w3.org/1999/xlink"


HTH!

Greetz,

Andreas


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