A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Spring in Action
this week in the
XML and Related Technologies
Access hidden field value in XSL
Joined: May 01, 2008
Dec 18, 2008 01:52:00
I have a hidden field in a XSL.
<input type = 'hidden' name = 'request'>
I just want to use the value of this field inside if condition in XSL -
<xsl:if test="request='abc'"> //Not working. Also $request is not working
<�. Code �>
Thanks a Lot.
SaurabhSri (SCJP 1.5)
Joined: Apr 14, 2004
Dec 18, 2008 02:14:00
Not sure I follow what you are trying to do. "request" is the value of the name attribute of the input element. You can't use XPath to select a value, you can only select elements and attributes.
We don't know the context of your
(have you already selected the input node?) but this:
will select all input elements which have an attribute called type which has a value of hidden.
It is sorta covered in the
JavaRanch Style Guide
subject: Access hidden field value in XSL
xsl variable and xsl:if
Testing if the parameter passed is empty..Help pls!
Converting an application using xstl from struts to struts 2
XSLT differences Java 1.4.2 to Java 1.6 ?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014