我想知道下面是否可能。我想檢查是否有任何這些條件回來是爲了打印聲明。xslt當多個或條件選擇
想知道寫這個的最好方法是什麼。謝謝
<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>'
我相信我需要回到主要貸款節點,例如,我有內部透支,所以顯然它只能看到這個內部的YES。有沒有一種方法可以在每個內部進行覆蓋,以掃描所有貸款節點? –
topcat3
好的,我正在學習。這個簡單的解決方案,我把//infront。 –
topcat3