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

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

I have the following xsl that sorts my xml alphabetically:


  
 



        
4条回答
  •  感动是毒
    2021-01-20 12:43

    Here is my solution.

    You can decide via parameters "per-row" and "show-empty" if you want empty cells to show up or if you want to hide them. I'm sure a much more elegant version exists, but I could not come up with one. ;-) Comments welcome.

    
      
    
      
      
       
      
    
      
        
       
    
      
        
        

    With this input:

    
      
        
        
        
        
        
        
        
        
        
      
    
    

    This output is produced (the title attributes were just for debugging. I left them in, remove them anytime):

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

提交回复
热议问题