我想知道以下是否可能。我想检查这些条件中的任何一个是否返回为是以打印该语句。
想知道写这个的最好方法是什么。谢谢
<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>
或者即使我只想确定是否有任何条件是,最好还是单独执行语句打印语句。
谢谢
添加:
这似乎正是我所需要的,但我的代码被分成很多单独的页面,所以我认为他们无法沟通以了解是否在其他页面中选择了“是”
<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>'