Subject: Re: [xsl] Getting parameters from a JSP From: Joerg Heinicke <joerg.heinicke@xxxxxx> Date: Wed, 09 Oct 2002 08:58:05 +0200 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Getting parameters from a, Jorge A. Salido | Thread | RE: [xsl] Getting parameters from a, Maesen, Edward |
RE: [xsl] Getting parameters from a, Jorge A. Salido | Date | [xsl] xalan extention - evaluate(), Andrey Solonchuk |
Month |