The simplest solution is to write an extension function instead of an extension element, and to call that from the xsl:variable's expression. Next simplest is to have the extension element return the value and invoke it within the body of an xsl:variable. Either of those approaches avoids your having to get involved in the details of binding the value to a variable.
______________________________________ "... Three things see no end: A loop with exit code done wrong, A semaphore untested, And the change that comes along. ..." -- "Threes" Rev 1.1 - Duane Elms / Leslie Fish (http://www.ovff.org/pegasus/songs/threes-rev-11.html)