..I guess there are 2 issues here..
1 - calling a template with the name which equals an
attribute value, and
2 - writing out the value of an Xpath which is itself
stored as an value in an attribute
These are both things that are available in Saxon as extensions, but not
available in the core language.
Other workarounds include:
* generating/modifying a stylesheet before executing it
* for case (1), a big xsl:choose statement
* Dynamic templates using the Dimitre's FXSL technique
Michael Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list