Re: [xsl]Local-Global Variable help

Subject: Re: [xsl]Local-Global Variable help
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 30 Aug 2006 13:36:10 +0100
> (xsl:template match="fields[descendant::field[utils:endsWith(@id,
> $var)]]")

Apart from the fact that $var has gone out of scope, in XSLt1 you can
not use a variable (or parameter) in a match pattern, even global
variables.



However it doesn't look like you need a variable here.
It appears that you want $var to be the value attribute of a field
element, and want to test for that in a matching template on field, but
you don't need a variable there, just use the attribute directly

xsl:template
match="fields[descendant::field[utils:endsWith(@id,@value)]]"

David

Current Thread