Quote:
Originally Posted by ismailc
This is what I tried, by setting the value of ( test="Value[. = 'on']" ) onClick
note on test: what you put in quotation marks has to be an expression. "Value[. = 'on']" means: if there (current node) exists an element named "Value" that has an (can not identify type) named "." whose value is "on", do something.
To me this does not make sense (so to the parser).
the correct expression depends on what element you want to test. example:
- // xml snippet
-
<button value="on" />
-
// xsl expression
-
<xsl:if test="button[@value = 'on']"></xsl:if>
-
-
// another xml
-
<button>
-
<value>on</value>
-
</button>
-
// xsl expression
-
<xsl:if test="button[value = 'on']"></xsl:if>
if you can provide us with the appropriate xml snippet, we can have a look at the matter again, otherwise we're lost in the woods.
PS: wildcard character is *; . refers to current node, but you can use it only on start of expression or inside xpath functions (e.g. ".", "./parent::*", "name(.)")