Error is XSL Template: End tag 'xsl:for-each' does not match the start tag
I'm modifying the standard SEPA template for several banks. In the current one, I'm getting the error End tag 'xsl:for-each' does not match the start tag. I don't understand why. I think I've ended every statement. In the standard output from Payment Processing, there are two consecutive occurrences of BankInstructionCode. There may be a better way to code the template so these two fields are output to different tags. I couldn't find it.
Here's the data example:
</BankInstruction>
</BankInstruction>
Here's a snippet of the template.
<PmtTpInf>
<xsl:for-each select="/OutboundPaymentInstruction/PaymentInstructionInfo/BankInstruction" />