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

RE: URL parameters in xsl

Subject: RE: URL parameters in xsl
From: "Martin Lampen" <mlampe@xxxxxxxxxxx>
Date: Tue, 20 May 2003 04:22:08 -0500
martin lampen
Thanks for all your replies. None of these solutions work though. the xsl file won't recognise the url - is this because it's generated from an .asp file!

help!!!

martin

-----Original Message-----
From: Hemi Kara [mailto:hemi@xxxxxxxxxxxxx]
Sent: 20 May 2003 04:54
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  URL parameters in xsl


Hi Martin,

My suggestion would be this:

1) Create a variable that holds the string after the = sign.
	<xsl:variable name="uidNum">
	<xsl:value-of select="substring-after(URL,'=')"/>
	</xsl:variable>

2) You can now use the variable in test
	<xsl:if test="$uidNum=1">.....then do something.....</xsl:if>
	<xsl:if test="$uidNum=2">.....then do something.....</xsl:if>

3) If you need the whole uid string then swap the [=] character for the [?]
character, and this will return [uid=2]

Hope this helps
Hemi Kara

hemi.kara@xxxxxxxxxxxxx

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Martin Lampen
Sent: Tuesday, 20 May 2003 10:01 a.m.
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  URL parameters in xsl


Hi all, am a newcomer to xsl I desperately need a way to extract the uid
parameter from a URL (eg. http://192.168.22.105/default.asp?uid=2) and use
it as a variable for if statements within xsl.

I've tried everything and while I can write the uid to the xsl template I
can't call it as a variable in if/match statement.

Please help! ;)

martin

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



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


 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.