How to call named templates based on a variable?

后端 未结 6 500
一生所求
一生所求 2020-12-15 23:53

I don\'t know if it\'s possible, but I\'m wondering how to do it...

Let\'s say we have the following XSL:


  Bla bla         


        
6条回答
  •  长情又很酷
    2020-12-15 23:59

    I think I had more or less the same problem as you. I had an "outer" template and wanted to call a different "inner" template depending on some variable set at run-time. I found your question by Googling for a way to have a dynamic . I solved it by using instead, as follows.

    The input XML (generated at run-time) contains something along the lines of: