[xep-support] SVG images resolving

Jonathan Gray Jonathan.Gray at agilisys.co.uk
Thu Feb 3 10:04:15 PST 2005


I make extensive use of SVG images in my xsl:fo using the
instream-foreign-object element (see example below).  What I'd like to be
able to intercept the calls that RenderX makes when trying to source the
images (xlink:href) and rather than going to the file system or the local
web server (if we specify xml:base as http://localhost/ <http://localhost/>
) I would like to retrieve the images from a database.  I have had a look
into URIResolver and EntityResolver but neither of these go down to the
required level.

 

Is there anyway that I can do this with RenderX?  Either using a java
library or chaging my xsl so that the URIResolver/EntityResolver are called
whenever an image is requested?

 

<fo:instream-foreign-object xmlns:svg="http://www.w3.org/2000/svg"
border="0pt" padding="0pt" width="100%" content-width="scale-to-fit"
content-height="21cm">

                                                <svg:svg width="594px"
height="420px" xmlns:xlink="http://www.w3.org/1999/xlink">

                                                            <svg:svg
id="bookmarkFront" width="594px" height="420px">

                                    <svg:rect id="background" x="0" y="0"
width="594" height="420" 

 
style="fill:rgb(255,255,255)" />

                                    <svg:image x="40" y="20" width="120"
height="380"

 
xlink:href="/templateImages/bookmark/art1.jpg" 

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

                                    <svg:image x="237" y="20" width="120"
height="380" 

 
xlink:href="/templateImages/bookmark/art2.jpg" 

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

                                    <svg:image x="434" y="20" width="120"
height="380" 

 
xlink:href="/templateImages/bookmark/art3.jpg" 

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

                                    <svg:text font-weight="bold"
fill="#000000" style="" x="279.85" 

                                                y="67.05"
text-anchor="middle" font-size="20px" 

                                                font-family="Arial">if you
can read this the test was probably 

                                                successful</svg:text>

                        </svg:svg>

                                                </svg:svg>

                                    </fo:instream-foreign-object>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20050203/343ab2c7/attachment.html>


More information about the Xep-support mailing list