XSLT call-template with dynamic QName?

前端 未结 5 1491
闹比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 21:02

    What you're attempting isn't directly possible, but why not simply match on the id attribute's value in the first place? If you absolutely need the indirection of the called template, then call it from the template that matches by id (see name4below):

    
        
            
        
        
        name1
        name2
        name3
        
            
        
        
        name1
        name2
        name3
        name4
    
    

    Input:

    
        ...
        ...
        ...
        ... 
    
    

    Output:

    name1name2name3name4
    

提交回复
热议问题