How to match and wrap identical and adjacent node together in XSLT 1.0?

前端 未结 2 1936
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-15 14:36

I have an XML file that look like this and I\'m trying to wrap \"Para_bb\" node that are adjacent to each other with a div.



        
2条回答
  •  孤街浪徒
    2021-01-15 15:11

    You can define a key as follows:

    
    
    
    
    
    
    
    
      
        
      
    
    
    
      

    That transforms

    
       
       
       1
       2
       3
       4
       
       5
       6
       
       
       7
    
    

    into

    
    
       

    1 2 3 4

    5 6

    7

提交回复
热议问题