xsl-list
[Top] [All Lists]

Using Relative filepaths for XSL-FO images with-in XSL

2005-06-23 14:07:05
Hello all,
I was messing with a template rule so when a document
points to another relatively, it applies templates to
make my XSL-FO document to it like so...

<xsl:apply-templates select="document(@href, .)"/>

But I need to pull an image into my Xsl-fo referred to
from that called xml file.


So x1.xml in '/' refer to x2.xml which refers to
x3.xml which is in '/child1/child2/' and x3.xml refers
to an image in its directory with an image tag like
so...
<image fileName="sample.jpg" />

But when I set an attribute for the image, it does not
take into account it is relative. How can I make the
url relative in this context? I dont have access to
document-uri() in xsl 1.0 to do something like this
document-uri(.)/../@fileName


<xsl:template match="image">
<fo:external-graphic>
<xsl:attribute name="src">url('<xsl:value-of
select="@fileName"/>')</xsl:attribute>
...

when transformed with FOP/Xalan I get:
[ERROR] Error while creating area : Error while
recovering Image Informations (file:///pyramadBig.jpg)

Any suggestions?,
Thanks in advance


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--