How to dynamically change xslt page-sequence based on node attributes?

后端 未结 3 1294
慢半拍i
慢半拍i 2021-01-19 00:10

The watered-down version of the problem I\'m having is this. For an XML file like:



    

        
3条回答
  •  误落风尘
    2021-01-19 00:57

    @empo: Excellent! So the basic approach is to handle the critical 'item's (where @cols changes) in the main loop, and handle the adjacent nodes to these in the recursive template call. I've used your approach and made a few changes to make the code simpler, but this works great!

    
        
        
        
    
        
            
    
                
                    
                        
                            
                                
                                    
                                        
                                            
                                        
                                    
    
                                
                                
                                    
                                        
                                            
                                        
                                    
                                
                            
                        
                    
                
            
        
    
    
        
        
            
            
            
                
            
        
    
    
    

提交回复
热议问题