You might be better off creating match-templates dynamically rather than named templates. You can create them to match elements in some namespace that doesn't exist in your source, and then invoke them by apply-templates to some dummy element created for the purpose. There's then a clean fallback if no template rule matches.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|