Recursively combine identical sibling elements in XSLT

前端 未结 3 614
你的背包
你的背包 2020-12-18 08:52

How can I merge all sibling elements with the same name and the same attributes into a single element using XSLT? The transformation should also be applied recursively to c

3条回答
  •  北荒
    北荒 (楼主)
    2020-12-18 09:35

    This should do the work:

    
    
      
      
      
        
          
            
          
        
      
      
        
        
          
          
            
              
              
                
              
            
          
        
      
    
    

    The tricky part is the definition of same-elements; indexing attributes by name is mandatory for verifying egality of all attributes.

提交回复
热议问题