View Single Post
  #4 (permalink)  
Old June 10th, 2009, 05:09 PM
mhkay's Avatar
mhkay mhkay is offline
Wrox Author
Points: 13,620, Level: 50
Points: 13,620, Level: 50 Points: 13,620, Level: 50 Points: 13,620, Level: 50
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,070
Thanks: 0
Thanked 119 Times in 117 Posts
Default

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
Reply With Quote
The Following User Says Thank You to mhkay For This Useful Post:
iceandrews (June 10th, 2009)