• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Access hidden field value in XSL

 
SaurabhSri Sri
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic