XSLT 1.0 Grouping

后端 未结 3 1311
半阙折子戏
半阙折子戏 2021-01-27 17:45

I need to apply XSLT 1.0 transformation to following XML:


  
    2013
    

        
3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-27 18:39

    Here are more straightforward solution using for-each and key:

    
    
        
        
    
        
            
                
                    
                    
                    
                        
                        
                            
                        
                        
                            
                        
                        
                            
                        
                    
                
            
        
    
    
    

    Which generate the following output:

    
    
      
        2013
        13
        13
        13
      
      
        2012
        12
        12
        
      
      
        2011
        
        
        11
      
    
    

提交回复
热议问题