[xep-support] XEP Java API: Setting a base directory for relative image inclusion

Jason Zaugg jzaugg at gmail.com
Thu Nov 22 08:25:05 PST 2007


I would like to layout a template authoring repository as follows:

\project1
\project1\xsf\project1.xsl
\project1\image\foo.jpg
\project2\xsf\project2.xsl
\project2\image\baz.jpg
\common\image\bar.jpg

I would then like to render some XML data with a XSL to PDF.

I would like to include relative path references in project1.xsl to
generate FO like:
<fo:external-graphic src="uri('file:/../image/foo.jpg" .../>
<fo:external-graphic src="uri('file:/../../image/bar.jpg" .../>

Can XEP be configured to perform relative file lookups? Is this only
relative to the working directory of the JVM, or configurable on each
FormatterImpl instance?

Or should I declare a variable 'basedir', and create absolute URIs. I
would need a way to pass this
<fo:external-graphic src="uri('file:///${basedir}/../../image/bar.jpg" .../>

Is the SystemID passed in the the StreamSource constructor related to
this in anyway?

Thanks,

Jason
-------------------
(*) 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/terms-of-service.html



More information about the Xep-support mailing list