How can I break a table row in xsl after a specified count?

后端 未结 4 384
南笙
南笙 2021-01-20 12:23

I have the following xsl that sorts my xml alphabetically:


  
 



        
4条回答
  •  清酒与你
    2021-01-20 12:31

    Here is a second solution, which doesn't require any extension functions. Do note that it is not recursive and may be more efficient than a recursive one.

    This transformation:

    
     
    
      
        ABCDE
        FGHIJ
        KLMNO
        PQRST
        UVWXY
        Z
      
        
        
        
        
    
        
    
      
        
          
        
      
    
      
    
        
            
                
    
                  
                
                     

    when applied on the following XML document:

    
        
            
            
            
            
            
            
            
            
            
        
    
    

    produces the wanted result:

    
    
    A
    Agenda
    B
    Boo
    F
    Foo
    P
    Policy
    Policy
    R
    Report
    Report
    T
    Test2
    Test1

    Do note that most of the explanations in my first answer apply also to this solution with the only exception that here we do not use modes.

提交回复
热议问题