[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Calculating Relative Paths in XSLT or Java

Subject: Calculating Relative Paths in XSLT or Java
From: "W. Eliot Kimber" <eliot@xxxxxxxxxx>
Date: Mon, 16 Jun 2003 18:48:36 -0500
java relative paths
This is slightly off topic, but this is the main development list I track and I figured someone here would probably know what I need and this is needed in the context of XSLT processing.

What I've got is my XSLT-based XInclude implementation (see the Dave Pawson XSL FAQ for a version of this code).

As part of the processing I'm doing I need to be able to rewrite URL pointers to graphics when the graphic as referenced in an included doc will not be in the same relative location WRT to the including doc.

For example, if I have a directory for the main document and, at the same level, a "common" directory that contains re-usable XML docs and graphics, then if the main document includes a common file that itself references a common graphic, if I don't rewrite the URL to that graphic (assuming the URL was originally relative, which of course it will be), then the resulting reference (in the final transcluded instance) will be pointing to the wrong place.

The solution of course is to rewrite the graphic reference URLs. This is a non-trivial thing to do (at least for me at this particular moment). I know I've puzzled it out in the past but just now I don't have time or energy for puzzles. So I was wondering if anyone could point me either to code that does this that I can crib from or has the algorithm at their fingertips and would be willing to share it?

Thanks,

Eliot
--
W. Eliot Kimber, eliot@xxxxxxxxxx
Consultant, ISOGEN International

1016 La Posada Dr., Suite 240
Austin, TX  78752 Phone: 512.656.4139


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.