> I'm looking for a way to call a template with a variable name or mode.

According to the XSLT spec, the values of those attributes are not Attribute Value Templates -- they're literal QNames. Hence, variable substitution or other _expression_ evaluation are not available.

Your best best seems to be to use xsl:if or xsl:choose to test the value of the variable and issue the corresponding version of the call or apply.

(It'd probably be possible to write a Xalan extension function which retrieved and executed a template selected by computed name. I'm not convinced that would be a Good Idea; it'd mean your stylesheet would run _ONLY_ on Xalan and _ONLY_ if this extension was present. But if you really can't solve the problem any other way...)



______________________________________
Joe Kesselman / IBM Research

Reply via email to