How-to break a for-each loop in XSLT?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
XSLT is written in a very functional style, and in this style there is no equivalent of a
breakstatement. What you can do is something like this:That way the
for-eachwill still iterate through all the nodes, but the body of the loop will only be executed if the condition is true.