aspose file tools*
The moose likes XML and Related Technologies and the fly likes Access hidden field value in XSL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Access hidden field value in XSL" Watch "Access hidden field value in XSL" New topic
Author

Access hidden field value in XSL

SaurabhSri Sri
Ranch Hand

Joined: May 01, 2008
Posts: 43
Hi All,

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 �>
</xsl:if>

Thanks a Lot.


Regards
SaurabhSri (SCJP 1.5)
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

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 test (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.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
 
subject: Access hidden field value in XSL