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

RE: selecting a parameter using string expression?

Subject: RE: selecting a parameter using string expression?
From: TSchutzerWeissmann@xxxxxxxxxxxxxxxx
Date: Wed, 14 Aug 2002 09:46:40 +0100
using string as parameter
Hi Mattias,

> > You can see whether a parameter with the same name exists:
> >    document('')/*/xsl:param[@name=$attribute-name]
> > but I'm not aware of a way to get the value assigned to the
> > parameter. XSLT has been designed to be a compiled language.
> >
> > J.Pietschmann
> 
> Ouch :( The scenario I'm facing is that I have an XSLT 
> generated menu that
> depends on the querystr. For example you click on a link and 
> it takes you to
> mypage?userID=1, that page in it's turn has some subitems for 
> things like
> sending a message to that user, the problem is that the 
> userID  (which is
> inserted into the stylesheet through params) needs to be 
> passed on to those
> pages. The solution I was thinking on was that for each item 
> define which
> params it should pass on and parse that in XSLT so when the 
> menu is rendered
> each item has the appropriate params and values. But it all 
> falls apart if I
> can't check the value of a parameter where the parameter name 
> is a string or
> attribute :/
> 

How about having only one parameter containing name:value pairs,
and make an adapted tokeniser to turn it into a node-set? That way
you could use XPath on your parameters to find out which ones they
are as well as what value they have.

Just a suggestion - I haven't completely got my head round your problem
so maybe I'm missing the wood for a tree or 2.
Tom


 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.