[xsl] Getting the current document URL from within XSLT

Subject: [xsl] Getting the current document URL from within XSLT
From: Mike Moran <Mike.Moran@xxxxxxxxxxx>
Date: Tue, 06 Feb 2001 17:37:49 +0000
Is this possible? I haven't got any refs to hand right now, but I've
done a quick search of my XSL List folder and the web, to no avail.

Why do I want to do this? Well, I am using axkit[1] to produce `simple'
and `complex' versions of a document (which is simple XHTML
to start with). I want to include a link in each version which points
to the other, so that a user can move between the different versions
if they so wish.

Axkit allows you to specify the style by looking for "?style=foo" at
the end of the URL eg: "http://foo.com/doc.xml?style=foo";. I want
to embed a link in the output produced from the "doc.xml" document
without having to specify the "doc.xml" or "http://foo.com/doc.xml"; as
part of the data the stylesheet reads, so:

"http://foo.com/doc.xml?style=simple"; contains:
... <a href="http://foo.com/doc.xml?style=complex";>Complex version</a>

and "http://foo.com/doc.xml?style=complex"; contains:
... <a href="http://foo.com/doc.xml?style=simple";>Simple version</a>

Is this possible, perhaps through extensions? I am currently using
Sablotron[2] via Axkit[1].

[1]: www.axkit.org
[2]: www.gingerall.com

-- 
Mike.Moran@xxxxxxxxxxx 
                   Web: http://houseofmoran.com/
               AvantGo: http://houseofmoran.com/Lite/

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


Current Thread