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

Re: Getting parameters from a JSP

Subject: Re: Getting parameters from a JSP
From: Joerg Heinicke <joerg.heinicke@xxxxxx>
Date: Wed, 09 Oct 2002 08:58:05 +0200
parameter jsp
Hi Jorge,

it's obviously a bug in the XSLT processor. Is it Xalan 2.2? I cam across the same problem a few days ago, when working in an older environment. My stylesheets did not work. But the unabbreviated solution provided by Edward is a clear solution, not such a work around like yours. It's up to you, which one to choose. Maybe you can upgrade the processor.

Regards,

Joerg

Jorge A. Salido wrote:
Thanks! Quite what I needed (besides having to set the parameter on the
jsp before the transformation).

Now I have another problem, or kind of :(    The parameter gets to the
xslt just fine, but in:

<xsl:for-each select="../row">
	<xsl:sort select="cell[$sortBy]"/>
...

Where $sortBy is my parameter. I actually print the parameter and it
prints the number I am expecting, but it doesn't do the sorting, whereas
when I enter a number in its place it works just fine. I've also tried
assigning the parameter to a variable to see if it would help, but with
no luck. My guess it is interpreting the parameter as text instead of a
number, but that seems odd. Do variables and parameters actually have a
type?

It actually works if I do an operation on it, like cell[$sortBy + 0] but
I would like to clear things up instead of doing quick workarounds.


Jorge


On Tue, 2002-10-08 at 10:50, Maesen, Edward wrote:


Use <xsl:param> in stead of <xsl:variable>.
If your querystring parameter is named "sort" then you can use it in your
stylesheet with <xsl:param name="sort" value="'xx'"/>, where xx is just a
default value in case there is no querystring parameter. Make sure the
<xsl:param> is at the top level and not within a template.

Edward





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.