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

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

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

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-03 14:22

    Put the condition for stopping the "loop" in the select attribute of the for-each element. For instance, to "break" after four elements:

    
    

    To iterate up to but not including a node that satisfied some particular condition:

    
    

提交回复
热议问题