XSLT Grouping Siblings

前端 未结 6 1346
滥情空心
滥情空心 2021-01-05 11:23

I am trying to group sibling data in an XML file.

Given :



    
             


        
6条回答
  •  感情败类
    2021-01-05 11:54

    The following xslt will work even if same timelines are scattered in multiple places. For e.g. in the foll xml there are 2 entries for timeline 10:00

    
    
        
            10:00
            team a v team b
            team c v team d
            12:00
            team e v team f
            16:00
            team g v team h
            team i v team j
            team k v team l
            10:00
            team a v team b new
            team c v team d new
        
    
    

    Xslt:

    
    
        
        
    
        
            
        
    
        
            
                
                    
                        
                            
                            
                            
                                
                                    
                                
                            
                        
                    
                
            
        
    
    

    Output:

    
    
        
            
                team a v team b
                team c v team d
                team a v team b new
                team c v team d new
            
            
                team e v team f
            
            
                team g v team h
                team i v team j
                team k v team l
            
        
    
    

提交回复
热议问题