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

XSL: Transform links and sources to an absolute URL

Subject: XSL: Transform links and sources to an absolute URL
From: Plew <plew@xxxxxx>
Date: Wed, 04 Mar 2009 13:35:27 +0100
 XSL: Transform links and sources to an absolute URL
Hello

this is my first post here, so i hope somebody can help me?
I have an XML file like this, with relative and absolute URL`s


<images>
<img src="http://www.foo.de/test/bar.jpg" alt="" width="800" height="600" />
<img src="/test/bar.jpg" alt="" width="800" height="600" />
</images>
<links>
<a href="www.foo.de">...hi there</a>
<a href="/test/test.html">bar</a>
</links>


..and know I need a way to append the absolute URL to the relative path`s to prevent errors, when i`m generating HTML on my server with an xslt.
Whats the best way? Pass a parameter with the URL to the XSLT? How can I dynamically add this to an src or href?


I`m using Saxon with XSLT 2.0.


greetings Stefan


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.