Ok, I don't think that I mentioned that I am new to
this xml and xsl thing. So basically what you are
saying is that I cannot have a dynaminc path (one read
in from the xsl sheet) and place it in the url? My
absolute path is already in the xml. There is no
generation what-so-ever. So can this xml data be read
into local xsl:variable and then used in the url?
I am using apache.xml.fop to generate my pdf off of my
xsl.
--- Eliot Kimber <ekimber(_at_)innodata-isogen(_dot_)com> wrote:
There is no simple single solution to this problem
because it depends
entirely on the relative locations of the FO
instance (if you are
generating an instance) and the graphic *at the time
you render them*,
not at the time you generate the FO.
Therefore, for different processing environments, it
might be most
appropriate to generate an absolute path and in
others you have to
generate a relative path relative to some
pre-defined location.
In addition, doing path processing is generally
easier in a language
like Java than in XSLT (although you can do it in
XSLT, of course). For
example, we have utility Java libraries that do
things like compare two
paths and return the shortest relative path. We then
expose these
through Saxon extension functions so that in the
XSLT we can easily
generate relative paths to graphics given some base
path (normally
passed in as a parameter to the XSLT process).
For one customer we have to provide an
FO-generation-time option of
whether graphic paths are relative or absolute
because different users
of the code have different business rules.
Finally, remember that relative paths will be
relative to the location
of the FO instance, not the original XML document
(unless you set the
xml:base attribute in the FO instance to be the
location of the orignal
XML document), which can be a problem, especially if
you generate the FO
instance and then move it somewhere else before
rendering it.
This is all presuming that your graphics are not
managed in some
URL-accessible content store that would allow you to
specify
location-independent absolute URIs. In essence, all
the W3C
specifications assume that this is the case, even
though for most users
it is never the case.
Cheers,
Eliot
--
W. Eliot Kimber
Professional Services
Innodata Isogen
9390 Research Blvd, #410
Austin, TX 78759
(512) 372-8155
ekimber(_at_)innodata-isogen(_dot_)com
www.innodata-isogen.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>
--~--
__________________________________
Yahoo! Messenger
Show us what our next emoticon should look like. Join the fun.
http://www.advision.webevents.yahoo.com/emoticontest
--~------------------------------------------------------------------
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>
--~--