[xep-support] Problem resolving relative URL with XEP.NET

Dave Pawson davep at dpawson.co.uk
Sat Mar 26 02:06:56 PST 2005


On Fri, 2005-03-25 at 14:33 -0600, Laub, David wrote:
> My question is how to specify a RELATIVE (versus absolute) path for
> external images in fo docs - when I specify an absolute path, everything
> is golden, but we need to specify a relative path.  AND the relative
> path begs this question - what is the path relative to - the running
> app's bin directory or an XEP directory.
> 
> Sample fo code with an absolute path: (This works!)
> 
> <fo:external-graphic content-width="201px" space-before.optimum="4pt"
> space-after.optimum="4pt">
>   <xsl:attribute name="src">url('<xsl:text
> disable-output-escaping="yes">file:///C:\Documents and
> Settings\dlaub\Desktop\Letter Mgmt\Wheels
> Logos\BlueGrayWithCar.jpg</xsl:text>')
>   </xsl:attribute>
> </fo:external-graphic>

I'm guessing this is within your xslt stylesheet?

Since the contents of the url is just that, you should be able to use 
a relative url,
so ignore the file:/// and just use 
url('/Documents and Settings/dlaub/......')
etc.

The file protocol is a bit of a minefield. I tried lots of combinations
with lots of processors, and there is very little consistency.


(it might be a nice idea to put the images somewhere relative to the fo
file, in a directory without whitespaces in the name. I'm hoping that
XEP can figure out the spaces.

HTH DaveP


> 
> For a relative path, I've tried UNsuccessfully
> 
> file:///BlueGrayWithCar.jpg
> file:BlueGrayWithCar.jpg
> BlueGrayWithCar.jpg
> 
> I think the systemId param in the Format method is key, but I'm not sure
> what to set it to - a absolute path, a relative path, etc.
> 
> ok = formatter.Format(xmlFile,<<see value
> below>>,"application/pdf",outFile);
> 
> << What I pass to systemId >>
> file:///C:/Documents and Settings/dlaub/My Documents/Visual Studio
> Projects/CollisionEndToEnd/bin/Debug/CollisionLetterA1.fo";
> 
> -------------------
> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
> in the body of the message to majordomo at renderx.com from the address
> you are subscribed from.
> (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



More information about the Xep-support mailing list