How do I prevent duplicates, in XSL?

后端 未结 6 642
长发绾君心
长发绾君心 2021-01-02 12:32

How do I prevent duplicate entries into a list, and then ideally, sort that list? What I\'m doing, is when information at one level is missing, taking the information from

6条回答
  •  抹茶落季
    2021-01-02 13:00

    A slightly shorter XSLT 2.0 version, combining approaches from other answers. Note that sorting is alphabetical, so that if the labels "54" and "156" are found, the output will be "156, 54". If a numerical sort is needed, use instead of .

    
         
        
    
         
             
                 
             
         
    
        
            
            
                
                
                    
                        
                            
                            , 
                            
                        
                     
                
                 
             
         
    
    

提交回复
热议问题