XSLT call-template with dynamic QName?

前端 未结 5 1480
闹比i
闹比i 2020-12-31 20:13

I have searched all around to find a solution to my problem, but i just got more questions...

consider the following XML:


               


        
5条回答
  •  庸人自扰
    2020-12-31 20:53

    Usually when someone tries to do this, it means they are not aware of the full power of xsl:apply-templates. The way to do dynamic despatch in XSLT is to use xsl:apply-templates. For example, for the problem cited, write template rules such as

    ...
    ...
    ...
    

    and then use to do the despatch.

提交回复
热议问题