以下が可能かと思います。これらの条件のいずれかがyesとして戻ってくるかどうかを確認して、ステートメントを印刷します。
これを書くための最良の方法は何でしょうか。ありがとう
<li>
<xsl:choose>
<xsl:when test="overdraftmoreaffordable/option [@id='yes']='selected' or businessmoreaffordable/option [@id='yes']='selected' or farmermoreaffordable/option [@id='yes']='selected' or loanprimiummoreaffordable/option [@id='yes']='selected' or loanmoreaffordable/option [@id='yes']='selected' or baseloanmoreaffordable/option [@id='yes']='selected' or termloanprimiummoreaffordable/option [@id='yes']='selected' or termmoreaffordable/option [@id='yes']='selected' or variablemoreaffordable/option [@id='yes']='selected' or fixedloanmoreaffordable/option [@id='yes']='selected'">Statement One</xsl:when>
<xsl:otherwise>Statement Two</xsl:otherwise>
</xsl:choose>
</li>
または、条件がyesであるかどうかを判断したいだけでも、ステートメントを個別に実行する方がよいでしょう。ステートメントを出力します。
ありがとう
添加:
これはまさに私が必要としていることのようですが、私のコードは別々のページに分けられているので、他のいずれかでYESが選択されたかどうかを知るために彼らが通信できるとは思いません
<xsl:if test="overdraft > 0">
<div style="margin-top: 0cm; margin-bottom: 0cm;">
<br/>
<b>Overdraft</b><br/>
An Overdraft allows your current account to go into an overdrawn position up to an agreed limit.<br/>
</div>
<xsl:for-each select="overdrafts/overdraftdata">
<div style="margin-top: 0cm; margin-bottom: 0cm;">
<br/>
This product is suitable because;
<ul>
<li>You are seeking a lending product for the purpose of <xsl:value-of select="overdraftpurpose"/></li>
<li>You are seeking a total amount of credit of EUR <xsl:value-of select="overdraftamount"/></li>
<li><xsl:choose>
<xsl:when test="*[substring(local-name(), string-length(local-name()) - 9) = 'affordable']/option[@id='yes']='selected'">
Repayment of the debt has been structured in a manner that is more affordable given your current circumstances
</xsl:when>
<xsl:otherwise>
You are likely to be able to repay the debt in the manner required under the credit agreement
</xsl:otherwise>
</xsl:choose>
</li>
<li>It is available for the term you require</li>
</ul>
</div>
</xsl:for-each>
</xsl:if>
<xsl:if test="businesscreditline > 0">
<div style="margin-top: 0cm; margin-bottom: 0cm;">
<br/>
<b>Business Credit Line</b><br/>
A Business Credit Line provides you with the convenience and flexibility of a pre-arranged line of
credit. It will facilitate improved budgeting and will give you greater choice in meeting your working
capital and short term funding needs<br/>
</div>
<xsl:for-each select="businesscreditlines/businesscreditlinedata">
<div style="margin-top: 0cm; margin-bottom: 0cm;">
<br/>
This product is suitable because;
<ul>
<li>You are seeking a lending product for the purpose of <xsl:value-of select="businesspurpose"/></li>
<li>You are seeking a total amount of credit of EUR <xsl:value-of select="businessamount"/></li>
<li><xsl:choose><xsl:when test="*[substring(local-name(), string-length(local-name()) - 9) = 'affordable']/option[@id='yes']='selected'">Repayment of the debt has been structured in a manner that is more affordable given your current circumstances</xsl:when><xsl:otherwise>You are likely to be able to repay the debt in the manner required under the credit agreement</xsl:otherwise></xsl:choose></li>
<li>It is available for the term you require</li>
</ul>
</div>
</xsl:for-each>
</xsl:if>'