I am trying to compare a value which was grabbed using the get method in a form and then passed into a xslt sheet. I named the string variable passed in browse. I want to check if the variable browse has a string value browse.
the code is below
<xsl:if test="$browse = 'browse' ">
<A>
<xsl:attribute name="href">searchPage.php?search=<xsl:value-of select="$search" />&browseButton=Browse&XML=Xml&page=<xsl:value-of select="number($Page)-1"/>&pagesize=<xsl:value-of select="$PageSize"/></xsl:attribute> <<Prev
</A>
</xsl:if>
What is the problem? Certainly the comparison is correct.
Here is a complete XSLT stylesheet demonstrating the correctness of your code:
When this transformation is applied on any XML document (not used), the desired result is produced: