XSLT Custom Sort

后端 未结 4 1895
故里飘歌
故里飘歌 2021-01-14 11:15

Is it possible in XSLT to sort in alphabetical order, with 5 items as \"preferred\".

i.e. given




        
4条回答
  •  隐瞒了意图╮
    2021-01-14 11:42

    You could do this:

    
    
       
    
      
        
          
          
          
          
          
        
      
    
      
        
          
          
          
            
          
          
          
            
          
        
      
    
      
        
      
    
    
    

    The whole could be moved to a secondary XML/config file, where you can also leave off the "my" namespace.

    After that, one line would need a small change:

    
    

    The output of the above is somewhat unsurprising :-)

    
      
      
      
      
      
      
      
      
      
      
      
      
    
    

提交回复
热议问题