Simon Kitching writes: >I am trying to implement an extension element like this: > <ext:field select="..." myattr1="..." myattr2="..."/> >where the select should be able to contain anything that would >normally be valid in an <xsl:value-of select="..."/> expression. >I have got this mostly working, but my code fails for... > <ext:field select="$foo"/> >My code which evaluates the specified select statement reports that >the variable "foo" cannot be found... >Variable "foo" is definitely in scope; replacing a call to my >extension with code like <xsl:value-of select="$foo"/> works fine.
This may involve lazy evaluation of variables. What happens if you do both <xsl:value-of select="$foo"/> <ext:field select="$foo"/> in that order? The value-of forces Xalan to evaluate $foo without involving your extension. Even if it doesn't solve the problem, it would be a good clue. .................David Marston
