How-to break a for-each loop in XSLT?

后端 未结 6 1961
死守一世寂寞
死守一世寂寞 2020-12-03 13:52

How-to break a for-each loop in XSLT?

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-03 14:28

    Hello I kwow this is an old post but maybe it can help other developers. I have found a way to break a for each in XSLT it is not litteraly a break but if you see the code you will get it. As you know or not know you can use inline C# code in xslt. In this example i want to loop al the nodes and take the first NTE node with Value RC But if I get a node that differs from the NTE node i want to stop looking at the condition. So I set a global variable in C# code and I ask the value each time I go through a node:

        
    
    
            
    
            
                 
            
                        
    
                            
                        
                     
                
            
            
            
                
            
        
    
    
        .....
    
        
      
          
    

提交回复
热议问题